{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<div>\n",
    "<a href=\"http://bokeh.pydata.org/\"><img src=\"../images/bokeh-header.png\"></a>\n",
    "</div>\n",
    "\n",
    "# Bokeh 快速概览\n",
    "\n",
    "Bokeh 是一个Python交互式可视化库，用于在现代Web浏览器上进行展示。它的目标是以D3.js风格提供优雅简洁的图形展示，并与大数据或流数据进行高效交互。Bokeh可以帮助快速轻松地创建交互图，仪表板，和数据应用。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 简单示例\n",
    "\n",
    "这是一个简单的例子。首先，我们从 [`bokeh.plotting`](https://bokeh.pydata.org/en/latest/docs/user_guide/plotting.html) 导入 [`figure`](https://bokeh.pydata.org/en/latest/docs/reference/plotting.html#bokeh.plotting.figure.figure) 函数，从而让我们轻松创建各种有趣的图表。我们还从 `bokeh.io` 导入 `show` 和 `ouptut_notebook` 函数 &mdash; 这使得我们能在Notebook中以内联的形式显示结果。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from bokeh.plotting import figure \n",
    "from bokeh.io import output_notebook, show"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "接下来，我们会告诉 Bokeh 直接在 Notebook 中显示图表。\n",
    "这将导致所有JavaScript和数据直接嵌入到Notebook的HTML中。\n",
    "（Bokeh可以直接输出到HTML文件，或者启动一个web server，我们后面会看到）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "    <div class=\"bk-root\">\n",
       "        <a href=\"https://bokeh.pydata.org\" target=\"_blank\" class=\"bk-logo bk-logo-small bk-logo-notebook\"></a>\n",
       "        <span id=\"2e092aa6-e4ab-4467-8f69-383704a4400b\">Loading BokehJS ...</span>\n",
       "    </div>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "(function(root) {\n",
       "  function now() {\n",
       "    return new Date();\n",
       "  }\n",
       "\n",
       "  var force = true;\n",
       "\n",
       "  if (typeof (root._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n",
       "    root._bokeh_onload_callbacks = [];\n",
       "    root._bokeh_is_loading = undefined;\n",
       "  }\n",
       "\n",
       "  var JS_MIME_TYPE = 'application/javascript';\n",
       "  var HTML_MIME_TYPE = 'text/html';\n",
       "  var EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n",
       "  var CLASS_NAME = 'output_bokeh rendered_html';\n",
       "\n",
       "  /**\n",
       "   * Render data to the DOM node\n",
       "   */\n",
       "  function render(props, node) {\n",
       "    var script = document.createElement(\"script\");\n",
       "    node.appendChild(script);\n",
       "  }\n",
       "\n",
       "  /**\n",
       "   * Handle when an output is cleared or removed\n",
       "   */\n",
       "  function handleClearOutput(event, handle) {\n",
       "    var cell = handle.cell;\n",
       "\n",
       "    var id = cell.output_area._bokeh_element_id;\n",
       "    var server_id = cell.output_area._bokeh_server_id;\n",
       "    // Clean up Bokeh references\n",
       "    if (id !== undefined) {\n",
       "      Bokeh.index[id].model.document.clear();\n",
       "      delete Bokeh.index[id];\n",
       "    }\n",
       "\n",
       "    if (server_id !== undefined) {\n",
       "      // Clean up Bokeh references\n",
       "      var cmd = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n",
       "      cell.notebook.kernel.execute(cmd, {\n",
       "        iopub: {\n",
       "          output: function(msg) {\n",
       "            var element_id = msg.content.text.trim();\n",
       "            Bokeh.index[element_id].model.document.clear();\n",
       "            delete Bokeh.index[element_id];\n",
       "          }\n",
       "        }\n",
       "      });\n",
       "      // Destroy server and session\n",
       "      var cmd = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n",
       "      cell.notebook.kernel.execute(cmd);\n",
       "    }\n",
       "  }\n",
       "\n",
       "  /**\n",
       "   * Handle when a new output is added\n",
       "   */\n",
       "  function handleAddOutput(event, handle) {\n",
       "    var output_area = handle.output_area;\n",
       "    var output = handle.output;\n",
       "\n",
       "    // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n",
       "    if ((output.output_type != \"display_data\") || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n",
       "      return\n",
       "    }\n",
       "\n",
       "    var toinsert = output_area.element.find(`.${CLASS_NAME.split(' ')[0]}`);\n",
       "\n",
       "    if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n",
       "      toinsert[0].firstChild.textContent = output.data[JS_MIME_TYPE];\n",
       "      // store reference to embed id on output_area\n",
       "      output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n",
       "    }\n",
       "    if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n",
       "      var bk_div = document.createElement(\"div\");\n",
       "      bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n",
       "      var script_attrs = bk_div.children[0].attributes;\n",
       "      for (var i = 0; i < script_attrs.length; i++) {\n",
       "        toinsert[0].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n",
       "      }\n",
       "      // store reference to server id on output_area\n",
       "      output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n",
       "    }\n",
       "  }\n",
       "\n",
       "  function register_renderer(events, OutputArea) {\n",
       "\n",
       "    function append_mime(data, metadata, element) {\n",
       "      // create a DOM node to render to\n",
       "      var toinsert = this.create_output_subarea(\n",
       "        metadata,\n",
       "        CLASS_NAME,\n",
       "        EXEC_MIME_TYPE\n",
       "      );\n",
       "      this.keyboard_manager.register_events(toinsert);\n",
       "      // Render to node\n",
       "      var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n",
       "      render(props, toinsert[0]);\n",
       "      element.append(toinsert);\n",
       "      return toinsert\n",
       "    }\n",
       "\n",
       "    /* Handle when an output is cleared or removed */\n",
       "    events.on('clear_output.CodeCell', handleClearOutput);\n",
       "    events.on('delete.Cell', handleClearOutput);\n",
       "\n",
       "    /* Handle when a new output is added */\n",
       "    events.on('output_added.OutputArea', handleAddOutput);\n",
       "\n",
       "    /**\n",
       "     * Register the mime type and append_mime function with output_area\n",
       "     */\n",
       "    OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n",
       "      /* Is output safe? */\n",
       "      safe: true,\n",
       "      /* Index of renderer in `output_area.display_order` */\n",
       "      index: 0\n",
       "    });\n",
       "  }\n",
       "\n",
       "  // register the mime type if in Jupyter Notebook environment and previously unregistered\n",
       "  if (root.Jupyter !== undefined) {\n",
       "    var events = require('base/js/events');\n",
       "    var OutputArea = require('notebook/js/outputarea').OutputArea;\n",
       "\n",
       "    if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n",
       "      register_renderer(events, OutputArea);\n",
       "    }\n",
       "  }\n",
       "\n",
       "  \n",
       "  if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n",
       "    root._bokeh_timeout = Date.now() + 5000;\n",
       "    root._bokeh_failed_load = false;\n",
       "  }\n",
       "\n",
       "  var NB_LOAD_WARNING = {'data': {'text/html':\n",
       "     \"<div style='background-color: #fdd'>\\n\"+\n",
       "     \"<p>\\n\"+\n",
       "     \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n",
       "     \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n",
       "     \"</p>\\n\"+\n",
       "     \"<ul>\\n\"+\n",
       "     \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n",
       "     \"<li>use INLINE resources instead, as so:</li>\\n\"+\n",
       "     \"</ul>\\n\"+\n",
       "     \"<code>\\n\"+\n",
       "     \"from bokeh.resources import INLINE\\n\"+\n",
       "     \"output_notebook(resources=INLINE)\\n\"+\n",
       "     \"</code>\\n\"+\n",
       "     \"</div>\"}};\n",
       "\n",
       "  function display_loaded() {\n",
       "    var el = document.getElementById(\"2e092aa6-e4ab-4467-8f69-383704a4400b\");\n",
       "    if (el != null) {\n",
       "      el.textContent = \"BokehJS is loading...\";\n",
       "    }\n",
       "    if (root.Bokeh !== undefined) {\n",
       "      if (el != null) {\n",
       "        el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n",
       "      }\n",
       "    } else if (Date.now() < root._bokeh_timeout) {\n",
       "      setTimeout(display_loaded, 100)\n",
       "    }\n",
       "  }\n",
       "\n",
       "\n",
       "  function run_callbacks() {\n",
       "    try {\n",
       "      root._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n",
       "    }\n",
       "    finally {\n",
       "      delete root._bokeh_onload_callbacks\n",
       "    }\n",
       "    console.info(\"Bokeh: all callbacks have finished\");\n",
       "  }\n",
       "\n",
       "  function load_libs(js_urls, callback) {\n",
       "    root._bokeh_onload_callbacks.push(callback);\n",
       "    if (root._bokeh_is_loading > 0) {\n",
       "      console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
       "      return null;\n",
       "    }\n",
       "    if (js_urls == null || js_urls.length === 0) {\n",
       "      run_callbacks();\n",
       "      return null;\n",
       "    }\n",
       "    console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
       "    root._bokeh_is_loading = js_urls.length;\n",
       "    for (var i = 0; i < js_urls.length; i++) {\n",
       "      var url = js_urls[i];\n",
       "      var s = document.createElement('script');\n",
       "      s.src = url;\n",
       "      s.async = false;\n",
       "      s.onreadystatechange = s.onload = function() {\n",
       "        root._bokeh_is_loading--;\n",
       "        if (root._bokeh_is_loading === 0) {\n",
       "          console.log(\"Bokeh: all BokehJS libraries loaded\");\n",
       "          run_callbacks()\n",
       "        }\n",
       "      };\n",
       "      s.onerror = function() {\n",
       "        console.warn(\"failed to load library \" + url);\n",
       "      };\n",
       "      console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
       "      document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
       "    }\n",
       "  };var element = document.getElementById(\"2e092aa6-e4ab-4467-8f69-383704a4400b\");\n",
       "  if (element == null) {\n",
       "    console.log(\"Bokeh: ERROR: autoload.js configured with elementid '2e092aa6-e4ab-4467-8f69-383704a4400b' but no matching script tag was found. \")\n",
       "    return false;\n",
       "  }\n",
       "\n",
       "  var js_urls = [\"https://cdn.pydata.org/bokeh/release/bokeh-0.12.10.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.10.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.12.10.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-gl-0.12.10.min.js\"];\n",
       "\n",
       "  var inline_js = [\n",
       "    function(Bokeh) {\n",
       "      Bokeh.set_log_level(\"info\");\n",
       "    },\n",
       "    \n",
       "    function(Bokeh) {\n",
       "      \n",
       "    },\n",
       "    function(Bokeh) {\n",
       "      console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.12.10.min.css\");\n",
       "      Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-0.12.10.min.css\");\n",
       "      console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.10.min.css\");\n",
       "      Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.10.min.css\");\n",
       "      console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-tables-0.12.10.min.css\");\n",
       "      Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.12.10.min.css\");\n",
       "    }\n",
       "  ];\n",
       "\n",
       "  function run_inline_js() {\n",
       "    \n",
       "    if ((root.Bokeh !== undefined) || (force === true)) {\n",
       "      for (var i = 0; i < inline_js.length; i++) {\n",
       "        inline_js[i].call(root, root.Bokeh);\n",
       "      }if (force === true) {\n",
       "        display_loaded();\n",
       "      }} else if (Date.now() < root._bokeh_timeout) {\n",
       "      setTimeout(run_inline_js, 100);\n",
       "    } else if (!root._bokeh_failed_load) {\n",
       "      console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n",
       "      root._bokeh_failed_load = true;\n",
       "    } else if (force !== true) {\n",
       "      var cell = $(document.getElementById(\"2e092aa6-e4ab-4467-8f69-383704a4400b\")).parents('.cell').data().cell;\n",
       "      cell.output_area.append_execute_result(NB_LOAD_WARNING)\n",
       "    }\n",
       "\n",
       "  }\n",
       "\n",
       "  if (root._bokeh_is_loading === 0) {\n",
       "    console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n",
       "    run_inline_js();\n",
       "  } else {\n",
       "    load_libs(js_urls, function() {\n",
       "      console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n",
       "      run_inline_js();\n",
       "    });\n",
       "  }\n",
       "}(window));"
      ],
      "application/vnd.bokehjs_load.v0+json": "\n(function(root) {\n  function now() {\n    return new Date();\n  }\n\n  var force = true;\n\n  if (typeof (root._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n    root._bokeh_onload_callbacks = [];\n    root._bokeh_is_loading = undefined;\n  }\n\n  \n\n  \n  if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n    root._bokeh_timeout = Date.now() + 5000;\n    root._bokeh_failed_load = false;\n  }\n\n  var NB_LOAD_WARNING = {'data': {'text/html':\n     \"<div style='background-color: #fdd'>\\n\"+\n     \"<p>\\n\"+\n     \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n     \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n     \"</p>\\n\"+\n     \"<ul>\\n\"+\n     \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n     \"<li>use INLINE resources instead, as so:</li>\\n\"+\n     \"</ul>\\n\"+\n     \"<code>\\n\"+\n     \"from bokeh.resources import INLINE\\n\"+\n     \"output_notebook(resources=INLINE)\\n\"+\n     \"</code>\\n\"+\n     \"</div>\"}};\n\n  function display_loaded() {\n    var el = document.getElementById(\"2e092aa6-e4ab-4467-8f69-383704a4400b\");\n    if (el != null) {\n      el.textContent = \"BokehJS is loading...\";\n    }\n    if (root.Bokeh !== undefined) {\n      if (el != null) {\n        el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n      }\n    } else if (Date.now() < root._bokeh_timeout) {\n      setTimeout(display_loaded, 100)\n    }\n  }\n\n\n  function run_callbacks() {\n    try {\n      root._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n    }\n    finally {\n      delete root._bokeh_onload_callbacks\n    }\n    console.info(\"Bokeh: all callbacks have finished\");\n  }\n\n  function load_libs(js_urls, callback) {\n    root._bokeh_onload_callbacks.push(callback);\n    if (root._bokeh_is_loading > 0) {\n      console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n      return null;\n    }\n    if (js_urls == null || js_urls.length === 0) {\n      run_callbacks();\n      return null;\n    }\n    console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n    root._bokeh_is_loading = js_urls.length;\n    for (var i = 0; i < js_urls.length; i++) {\n      var url = js_urls[i];\n      var s = document.createElement('script');\n      s.src = url;\n      s.async = false;\n      s.onreadystatechange = s.onload = function() {\n        root._bokeh_is_loading--;\n        if (root._bokeh_is_loading === 0) {\n          console.log(\"Bokeh: all BokehJS libraries loaded\");\n          run_callbacks()\n        }\n      };\n      s.onerror = function() {\n        console.warn(\"failed to load library \" + url);\n      };\n      console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n      document.getElementsByTagName(\"head\")[0].appendChild(s);\n    }\n  };var element = document.getElementById(\"2e092aa6-e4ab-4467-8f69-383704a4400b\");\n  if (element == null) {\n    console.log(\"Bokeh: ERROR: autoload.js configured with elementid '2e092aa6-e4ab-4467-8f69-383704a4400b' but no matching script tag was found. \")\n    return false;\n  }\n\n  var js_urls = [\"https://cdn.pydata.org/bokeh/release/bokeh-0.12.10.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.10.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.12.10.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-gl-0.12.10.min.js\"];\n\n  var inline_js = [\n    function(Bokeh) {\n      Bokeh.set_log_level(\"info\");\n    },\n    \n    function(Bokeh) {\n      \n    },\n    function(Bokeh) {\n      console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.12.10.min.css\");\n      Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-0.12.10.min.css\");\n      console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.10.min.css\");\n      Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.10.min.css\");\n      console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-tables-0.12.10.min.css\");\n      Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.12.10.min.css\");\n    }\n  ];\n\n  function run_inline_js() {\n    \n    if ((root.Bokeh !== undefined) || (force === true)) {\n      for (var i = 0; i < inline_js.length; i++) {\n        inline_js[i].call(root, root.Bokeh);\n      }if (force === true) {\n        display_loaded();\n      }} else if (Date.now() < root._bokeh_timeout) {\n      setTimeout(run_inline_js, 100);\n    } else if (!root._bokeh_failed_load) {\n      console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n      root._bokeh_failed_load = true;\n    } else if (force !== true) {\n      var cell = $(document.getElementById(\"2e092aa6-e4ab-4467-8f69-383704a4400b\")).parents('.cell').data().cell;\n      cell.output_area.append_execute_result(NB_LOAD_WARNING)\n    }\n\n  }\n\n  if (root._bokeh_is_loading === 0) {\n    console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n    run_inline_js();\n  } else {\n    load_libs(js_urls, function() {\n      console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n      run_inline_js();\n    });\n  }\n}(window));"
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "output_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "接着，我们导入NumPy并且创建一些简单数据。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from numpy import cos, linspace\n",
    "x = linspace(-6, 6, 100)\n",
    "y = cos(x)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "现在，我们调用Bokeh的`figure`函数创建一个图表`p`。然后，我们调用其`circle()`方法在每个X,Y点处渲染一个红圈。\n",
    "\n",
    "我们可以立即操作该图表：\n",
    "\n",
    "  * 点击-拖动 可以平移图表\n",
    "  * 鼠标滚轮 可以放大和缩小（先在工具栏选取）\n",
    "  \n",
    "下图中的工具栏是所有图表都可用的默认工具栏。它可以通过`tools`关键字参数进一步配置。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<div class=\"bk-root\">\n",
       "    <div class=\"bk-plotdiv\" id=\"abac0277-b522-4a5e-893f-11272592630f\"></div>\n",
       "</div>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    var docs_json = {\"b66a532b-c459-4d40-aeb3-724a9e27826a\":{\"roots\":{\"references\":[{\"attributes\":{\"formatter\":{\"id\":\"1d35b2d5-c0c4-41eb-88c6-1d1519c24f67\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"d916e575-0002-4e22-b6ba-96ff2fa5318b\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"03ec493f-4f50-4038-97ca-e9dda8d5b879\",\"type\":\"BasicTicker\"}},\"id\":\"a8ef303b-6e51-49e9-8b44-e0d0e581b16d\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"03ec493f-4f50-4038-97ca-e9dda8d5b879\",\"type\":\"BasicTicker\"},{\"attributes\":{\"plot\":{\"id\":\"d916e575-0002-4e22-b6ba-96ff2fa5318b\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"03ec493f-4f50-4038-97ca-e9dda8d5b879\",\"type\":\"BasicTicker\"}},\"id\":\"829d8f7c-4782-4278-af6d-516f774cbf5c\",\"type\":\"Grid\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":7},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"176d083b-d884-4470-bb1f-ce5dbaab0fb6\",\"type\":\"Circle\"},{\"attributes\":{\"formatter\":{\"id\":\"d94b290e-e188-4f67-9c4b-1a27c9dc75ce\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"d916e575-0002-4e22-b6ba-96ff2fa5318b\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"d0609c3b-ea4b-4a3c-8f22-1b620d333451\",\"type\":\"BasicTicker\"}},\"id\":\"57220596-e741-4b00-b811-c407b3debbc1\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"d94b290e-e188-4f67-9c4b-1a27c9dc75ce\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"d0609c3b-ea4b-4a3c-8f22-1b620d333451\",\"type\":\"BasicTicker\"},{\"attributes\":{\"dimension\":1,\"plot\":{\"id\":\"d916e575-0002-4e22-b6ba-96ff2fa5318b\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"d0609c3b-ea4b-4a3c-8f22-1b620d333451\",\"type\":\"BasicTicker\"}},\"id\":\"da3ce444-6e8a-4194-92b4-9c9444266faa\",\"type\":\"Grid\"},{\"attributes\":{\"data_source\":{\"id\":\"2cc96b61-3a46-4fa1-ac66-ae80de3c162f\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"72a9fd4d-d178-4352-8f08-f0e562a189ae\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"176d083b-d884-4470-bb1f-ce5dbaab0fb6\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"e5c4970e-b9c8-4316-840f-e7eb2a9a7d27\",\"type\":\"CDSView\"}},\"id\":\"9a153ac9-1a57-4f7f-8782-7280aa9a0c3a\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"2cc96b61-3a46-4fa1-ac66-ae80de3c162f\",\"type\":\"ColumnDataSource\"}},\"id\":\"e5c4970e-b9c8-4316-840f-e7eb2a9a7d27\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"firebrick\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"firebrick\"},\"size\":{\"units\":\"screen\",\"value\":7},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"72a9fd4d-d178-4352-8f08-f0e562a189ae\",\"type\":\"Circle\"},{\"attributes\":{\"below\":[{\"id\":\"a8ef303b-6e51-49e9-8b44-e0d0e581b16d\",\"type\":\"LinearAxis\"}],\"left\":[{\"id\":\"57220596-e741-4b00-b811-c407b3debbc1\",\"type\":\"LinearAxis\"}],\"plot_height\":500,\"plot_width\":500,\"renderers\":[{\"id\":\"a8ef303b-6e51-49e9-8b44-e0d0e581b16d\",\"type\":\"LinearAxis\"},{\"id\":\"829d8f7c-4782-4278-af6d-516f774cbf5c\",\"type\":\"Grid\"},{\"id\":\"57220596-e741-4b00-b811-c407b3debbc1\",\"type\":\"LinearAxis\"},{\"id\":\"da3ce444-6e8a-4194-92b4-9c9444266faa\",\"type\":\"Grid\"},{\"id\":\"46ee845c-11fb-4da0-ad79-5f3037cff41c\",\"type\":\"BoxAnnotation\"},{\"id\":\"9a153ac9-1a57-4f7f-8782-7280aa9a0c3a\",\"type\":\"GlyphRenderer\"}],\"title\":{\"id\":\"3425a46a-dc48-4ede-908b-5906d40539d0\",\"type\":\"Title\"},\"toolbar\":{\"id\":\"5b8f3980-3550-45df-8801-114c3dc6dfe7\",\"type\":\"Toolbar\"},\"x_range\":{\"id\":\"84a3e739-b6b0-40b8-a72c-6315696665dd\",\"type\":\"DataRange1d\"},\"x_scale\":{\"id\":\"4cc69d13-10fc-408d-9156-73d1c6369679\",\"type\":\"LinearScale\"},\"y_range\":{\"id\":\"8580311c-8bea-4888-80ab-c860667e55be\",\"type\":\"DataRange1d\"},\"y_scale\":{\"id\":\"b88d2dbf-b50d-4b6f-8e34-3b11a89d1e18\",\"type\":\"LinearScale\"}},\"id\":\"d916e575-0002-4e22-b6ba-96ff2fa5318b\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"x\",\"y\"],\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAGMCEDz744IMXwAgffPDBBxfAjC666KKLFsAQPvjggw8WwJNNNtlkkxXAF1100UUXFcCbbLLJJpsUwB988MEHHxTAo4suuuiiE8Anm2yyySYTwKqqqqqqqhLALrrooosuEsCyySabbLIRwDbZZJNNNhHAuuiiiy66EMA++OCDDz4QwIQPPvjggw/AjC666KKLDsCTTTbZZJMNwJtssskmmwzAo4suuuiiC8CqqqqqqqoKwLLJJptssgnAuuiiiy66CMDCBx988MEHwMomm2yyyQbA0UUXXXTRBcDZZJNNNtkEwOGDDz744APA6KKLLrroAsDwwQcffPABwPjggw8++ADAAAAAAAAAAMAQPvjggw/+vyB88MEHH/y/MLrooosu+r88+OCDDz74v0w22WSTTfa/XHTRRRdd9L9ssskmm2zyv3zwwQcffPC/GF100UUX7b842WSTTTbpv1BVVVVVVeW/cNFFF1104b8gm2yyySbbv2CTTTbZZNO/QBdddNFFx78AH3zwwQevvwAffPDBB68/QBdddNFFx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fMS1t/d47z/J2auZvoruPzZGUzrJKe0/9KlUikVb6z8UKWwK/SXpP5iIOkw7kuY/HBvGyK6p4z86HryBRHfgP0BpJ+z9Ddo/79yFCJLL0j+fbwmOFYXGP623r6a2eaw/sSQZ5fDFsL+IdE4m3cTHv8AIFZa7ZtO/BXJTVyai2r+siE7cwbzgvwcNBzyQ6eO/wpQK3pDL5r98k1xY71fpv8z5xvIYheu/+pJWneBK7b9f5j+nnaLuv2KAysJEh++/lWFJ+Hr177+zMvFAouvvv2soMprfae+/pK/Cehpy7r+I5mSr9Qftv38pRp7BMOu/yEpIeGjz6L9amTMXVFjmvzOtZnZOaeO/GSzA6Fwx4L8u1s9jLXnZv08V/jTvL9K/pYFip7xExb/uV1fH02anv3PrzzyaTrM/nGjcYAsEyT/Q8oH0ZwHUPyc8XOmiNds/pycYONMB4T+oNfsz8SjkP/HRslpTBOc/WLzTHz6J6T+tE73JOq7rPwlj6v46a+0/9SJ4Cbe57j8=\",\"dtype\":\"float64\",\"shape\":[100]}}},\"id\":\"2cc96b61-3a46-4fa1-ac66-ae80de3c162f\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"82cbeb47-95ba-443b-8bf9-ec49593fd1b3\",\"type\":\"PanTool\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"46ee845c-11fb-4da0-ad79-5f3037cff41c\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"82cbeb47-95ba-443b-8bf9-ec49593fd1b3\",\"type\":\"PanTool\"},{\"id\":\"bf393fca-96a2-4f89-926f-4e4316aba12e\",\"type\":\"WheelZoomTool\"},{\"id\":\"b8980507-8cbd-43ce-86b6-3109bc074c99\",\"type\":\"BoxZoomTool\"},{\"id\":\"7dc3ce79-cce9-426c-b41d-89df2ac786d1\",\"type\":\"SaveTool\"},{\"id\":\"f54e67cb-5703-410c-b37e-008c724b5be1\",\"type\":\"ResetTool\"},{\"id\":\"e85567b4-ca60-4b62-a43d-c523059c4875\",\"type\":\"HelpTool\"}]},\"id\":\"5b8f3980-3550-45df-8801-114c3dc6dfe7\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"bf393fca-96a2-4f89-926f-4e4316aba12e\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"callback\":null},\"id\":\"84a3e739-b6b0-40b8-a72c-6315696665dd\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1d35b2d5-c0c4-41eb-88c6-1d1519c24f67\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"overlay\":{\"id\":\"46ee845c-11fb-4da0-ad79-5f3037cff41c\",\"type\":\"BoxAnnotation\"}},\"id\":\"b8980507-8cbd-43ce-86b6-3109bc074c99\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"plot\":null,\"text\":\"\"},\"id\":\"3425a46a-dc48-4ede-908b-5906d40539d0\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"7dc3ce79-cce9-426c-b41d-89df2ac786d1\",\"type\":\"SaveTool\"},{\"attributes\":{\"callback\":null},\"id\":\"8580311c-8bea-4888-80ab-c860667e55be\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"f54e67cb-5703-410c-b37e-008c724b5be1\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"4cc69d13-10fc-408d-9156-73d1c6369679\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"e85567b4-ca60-4b62-a43d-c523059c4875\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"b88d2dbf-b50d-4b6f-8e34-3b11a89d1e18\",\"type\":\"LinearScale\"}],\"root_ids\":[\"d916e575-0002-4e22-b6ba-96ff2fa5318b\"]},\"title\":\"Bokeh Application\",\"version\":\"0.12.10\"}};\n",
       "    var render_items = [{\"docid\":\"b66a532b-c459-4d40-aeb3-724a9e27826a\",\"elementid\":\"abac0277-b522-4a5e-893f-11272592630f\",\"modelid\":\"d916e575-0002-4e22-b6ba-96ff2fa5318b\"}];\n",
       "\n",
       "    root.Bokeh.embed.embed_items(docs_json, render_items);\n",
       "  }\n",
       "\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    var attempts = 0;\n",
       "    var timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        embed_document(root);\n",
       "        clearInterval(timer);\n",
       "      }\n",
       "      attempts++;\n",
       "      if (attempts > 100) {\n",
       "        console.log(\"Bokeh: ERROR: Unable to embed document because BokehJS library is missing\")\n",
       "        clearInterval(timer);\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "d916e575-0002-4e22-b6ba-96ff2fa5318b"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "p = figure(width=500, height=500)\n",
    "p.circle(x, y, size=7, color=\"firebrick\", alpha=0.5)\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 柱状图示例\n",
    "\n",
    "\n",
    "Bokeh的核心显示模型依赖于绑定到数据序列的 *图形原语*。这类似于Protovis和D3，和其他大多数Python绘图库不同。\n",
    "\n",
    "一个稍微复杂一些的例子演示了这个想法。\n",
    "\n",
    "Bokeh在`bokeh.sampledata`包内置了一些有趣的数据集 \"sample data\" 。我们会加载一些汽车里程历史数据，数据类型为Pandas的`DataFrame`。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from bokeh.sampledata.autompg import autompg\n",
    "\n",
    "grouped = autompg.groupby(\"yr\")\n",
    "mpg = grouped[\"mpg\"]\n",
    "avg = mpg.mean()\n",
    "std = mpg.std()\n",
    "years = list(grouped.groups.keys())\n",
    "american = autompg[autompg[\"origin\"]==1]\n",
    "japanese = autompg[autompg[\"origin\"]==3]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "我们要绘制每年的英里数分布图。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\ProgramData\\Anaconda3\\lib\\site-packages\\bokeh\\core\\json_encoder.py:80: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n",
      "  elif np.issubdtype(type(obj), np.float):\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<div class=\"bk-root\">\n",
       "    <div class=\"bk-plotdiv\" id=\"4aa20eaf-4c3c-4768-b2f8-f1a200fd8dee\"></div>\n",
       "</div>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    var docs_json = {\"2d01f7f1-9a51-4b93-986b-e30be36436e2\":{\"roots\":{\"references\":[{\"attributes\":{\"overlay\":{\"id\":\"73808e57-ee56-4784-b5bc-f25f207a2a52\",\"type\":\"BoxAnnotation\"}},\"id\":\"8670aa86-5311-42c2-847d-6f8700c4ef49\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"641ff125-3565-41a3-80d3-1deaf632fec9\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"cfdd2aa7-cb49-4f06-b8b9-0209d81d5c56\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"data_source\":{\"id\":\"c1a4db18-4ef0-4689-a018-1b72b5a00082\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"cebeb7f4-1ed8-4d49-bad7-d02041c63faf\",\"type\":\"Triangle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"ccaeff4b-4138-484b-9169-06f157506ad2\",\"type\":\"Triangle\"},\"selection_glyph\":null,\"view\":{\"id\":\"84b31676-466f-4640-a34f-6a812506dc5b\",\"type\":\"CDSView\"}},\"id\":\"c4207955-5f24-4609-b912-8db7581eae66\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"plot\":null,\"text\":\"MPG by Year (Japan and US)\"},\"id\":\"da42150d-6d0f-431e-a8f2-b120ac4b885e\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"7e432578-b545-48e9-a190-a5a5fd386cbe\",\"type\":\"ResetTool\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"x\",\"y\"],\"data\":{\"x\":[70,70,71,71,71,71,72,72,72,72,72,73,73,73,73,74,74,74,74,74,74,75,75,75,75,76,76,76,76,77,77,77,77,77,77,78,78,78,78,78,78,78,78,79,79,80,80,80,80,80,80,80,80,80,80,80,80,80,81,81,81,81,81,81,81,81,81,81,81,81,82,82,82,82,82,82,82,82,82],\"y\":{\"__ndarray__\":\"AAAAAAAAOEAAAAAAAAA7QAAAAAAAADtAAAAAAAAAOUAAAAAAAAA/QAAAAAAAgEFAAAAAAAAAOEAAAAAAAAAzQAAAAAAAADxAAAAAAAAAN0AAAAAAAAA7QAAAAAAAADRAAAAAAAAANkAAAAAAAAAyQAAAAAAAADRAAAAAAAAAP0AAAAAAAABAQAAAAAAAAD9AAAAAAAAAQEAAAAAAAAA4QAAAAAAAADpAAAAAAAAAPUAAAAAAAAA4QAAAAAAAADhAAAAAAACAQEAAAAAAAIBAQAAAAAAAAEBAAAAAAAAAPEAAAAAAAAAzQAAAAAAAgD9AAAAAAADAQEAAAAAAAAA6QAAAAAAAAD5AAAAAAAAANkAAAAAAAIA1QGZmZmZmZkBAMzMzMzOzQ0DNzMzMzAxCQAAAAAAAgDtAMzMzMzMzO0CamZmZmRk1QGZmZmZm5jdAAAAAAACAPUDNzMzMzAxBQM3MzMzMzD9AzczMzMwMQ0CamZmZmZlCQM3MzMzMzD1AzczMzMxMP0AAAAAAAIBCQJqZmZmZGUBAzczMzMxMR0BmZmZmZmZEQM3MzMzMTEZAZmZmZmbmQECamZmZmVlAQDMzMzMzszdAMzMzMzMzQEDNzMzMzIxDQM3MzMzMjEFAZmZmZmYmQEAAAAAAAIBCQJqZmZmZ2UJAzczMzMwMQUCamZmZmdlAQDMzMzMzM0BAMzMzMzNzQECamZmZmZk/QGZmZmZmZjlAMzMzMzMzOEAAAAAAAIBCQAAAAAAAAD9AAAAAAAAAQkAAAAAAAABCQAAAAAAAAEFAAAAAAAAAQ0AAAAAAAABAQAAAAAAAAENAAAAAAAAAQEA=\",\"dtype\":\"float64\",\"shape\":[79]}}},\"id\":\"a5014e2b-626d-4469-98f8-acb202ce5f39\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"items\":[{\"id\":\"1e3140d2-f0fb-4f5d-b42c-1fc840db88a7\",\"type\":\"LegendItem\"},{\"id\":\"b2a4699f-cb0e-4bef-af19-8ee54799abeb\",\"type\":\"LegendItem\"},{\"id\":\"9b855ca9-05eb-4a51-8b97-ed7bf369571a\",\"type\":\"LegendItem\"}],\"location\":\"top_left\",\"plot\":{\"id\":\"704bcd7c-42f7-41ea-a2d7-d8e0e3299002\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"1501993e-2ca3-4774-890a-e3513316e24c\",\"type\":\"Legend\"},{\"attributes\":{\"source\":{\"id\":\"d854109c-0b50-471a-9134-60b5ba2a3962\",\"type\":\"ColumnDataSource\"}},\"id\":\"c13049c1-a395-4b15-b029-33fed9a10a25\",\"type\":\"CDSView\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"34d00f3e-5267-47f3-a7e0-fb390246774e\",\"type\":\"PanTool\"},{\"id\":\"6a5be5bc-32c3-43d6-998c-e3d2cecb46e7\",\"type\":\"WheelZoomTool\"},{\"id\":\"8670aa86-5311-42c2-847d-6f8700c4ef49\",\"type\":\"BoxZoomTool\"},{\"id\":\"641ff125-3565-41a3-80d3-1deaf632fec9\",\"type\":\"SaveTool\"},{\"id\":\"7e432578-b545-48e9-a190-a5a5fd386cbe\",\"type\":\"ResetTool\"},{\"id\":\"daae8816-1fa0-41df-be48-4a7bfff583e9\",\"type\":\"HelpTool\"}]},\"id\":\"7b543c14-c2d8-4ace-9c0d-99732402e5f9\",\"type\":\"Toolbar\"},{\"attributes\":{\"data_source\":{\"id\":\"a5014e2b-626d-4469-98f8-acb202ce5f39\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"6994a5b6-c573-4863-b068-f4ed99e8aa47\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"9fc1cadf-9355-4798-ab84-0550dcf54e68\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"3fcf4eb5-4495-4758-b9b0-fcf5ba5f768f\",\"type\":\"CDSView\"}},\"id\":\"0ee7fb76-b3dc-4c49-8c4a-1eba2f21ead4\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"a5014e2b-626d-4469-98f8-acb202ce5f39\",\"type\":\"ColumnDataSource\"}},\"id\":\"3fcf4eb5-4495-4758-b9b0-fcf5ba5f768f\",\"type\":\"CDSView\"},{\"attributes\":{\"callback\":null},\"id\":\"b682722b-8c0c-412a-87b5-81aa7a23b888\",\"type\":\"DataRange1d\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"red\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"red\"},\"size\":{\"units\":\"screen\",\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6994a5b6-c573-4863-b068-f4ed99e8aa47\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"9fc1cadf-9355-4798-ab84-0550dcf54e68\",\"type\":\"Circle\"},{\"attributes\":{\"label\":{\"value\":\"Japanese\"},\"renderers\":[{\"id\":\"0ee7fb76-b3dc-4c49-8c4a-1eba2f21ead4\",\"type\":\"GlyphRenderer\"}]},\"id\":\"b2a4699f-cb0e-4bef-af19-8ee54799abeb\",\"type\":\"LegendItem\"},{\"attributes\":{\"below\":[{\"id\":\"565cc52c-c933-4f2a-aed6-9bf5b8b46ef0\",\"type\":\"LinearAxis\"}],\"left\":[{\"id\":\"cc4afa5f-5ab3-4c19-a334-61cb4307be27\",\"type\":\"LinearAxis\"}],\"renderers\":[{\"id\":\"565cc52c-c933-4f2a-aed6-9bf5b8b46ef0\",\"type\":\"LinearAxis\"},{\"id\":\"e494c7c7-7b92-42ae-83e2-2422b8ddd46e\",\"type\":\"Grid\"},{\"id\":\"cc4afa5f-5ab3-4c19-a334-61cb4307be27\",\"type\":\"LinearAxis\"},{\"id\":\"590b1700-1aa5-4635-8ffe-1804d02ccca3\",\"type\":\"Grid\"},{\"id\":\"73808e57-ee56-4784-b5bc-f25f207a2a52\",\"type\":\"BoxAnnotation\"},{\"id\":\"1501993e-2ca3-4774-890a-e3513316e24c\",\"type\":\"Legend\"},{\"id\":\"fba834ff-ef18-4dc1-ae52-9f59eda25cad\",\"type\":\"GlyphRenderer\"},{\"id\":\"0ee7fb76-b3dc-4c49-8c4a-1eba2f21ead4\",\"type\":\"GlyphRenderer\"},{\"id\":\"c4207955-5f24-4609-b912-8db7581eae66\",\"type\":\"GlyphRenderer\"}],\"title\":{\"id\":\"da42150d-6d0f-431e-a8f2-b120ac4b885e\",\"type\":\"Title\"},\"toolbar\":{\"id\":\"7b543c14-c2d8-4ace-9c0d-99732402e5f9\",\"type\":\"Toolbar\"},\"x_range\":{\"id\":\"b682722b-8c0c-412a-87b5-81aa7a23b888\",\"type\":\"DataRange1d\"},\"x_scale\":{\"id\":\"ec3dde08-0dda-4f85-928a-dc2f7839a0d8\",\"type\":\"LinearScale\"},\"y_range\":{\"id\":\"709a4435-c70a-419f-a77d-d241a4df5998\",\"type\":\"DataRange1d\"},\"y_scale\":{\"id\":\"2cc87c9d-0cea-4f54-9bf8-954717164ede\",\"type\":\"LinearScale\"}},\"id\":\"704bcd7c-42f7-41ea-a2d7-d8e0e3299002\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"x\",\"y\"],\"data\":{\"x\":[70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,74,74,74,74,74,74,74,74,74,74,74,74,74,74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,80,80,80,80,80,80,81,81,81,81,81,81,81,81,81,81,81,81,81,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82],\"y\":{\"__ndarray__\":\"AAAAAAAAMkAAAAAAAAAuQAAAAAAAADJAAAAAAAA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AAAAAEBBQGZmZmZmZjxAzczMzMzMPEDNzMzMzMw6QAAAAAAAwEBAzczMzMwMQEAAAAAAAAA8QGZmZmZmZjpAzczMzMxMOECamZmZmRkzQGZmZmZm5jtAMzMzMzMzO0CamZmZmZk6QM3MzMzMzDlAAAAAAACAN0AAAAAAAAA+QAAAAAAAgENAmpmZmZlZQUAzMzMzMzNBQGZmZmZm5j1AZmZmZmZmNkCamZmZmZk6QDMzMzMzMzRAmpmZmZmZMUAAAAAAAAA8QAAAAAAAADtAAAAAAAAAQUAAAAAAAAA/QAAAAAAAAD1AAAAAAAAAO0AAAAAAAAA4QAAAAAAAAENAAAAAAAAAQkAAAAAAAAA5QAAAAAAAAENAAAAAAAAAOkAAAAAAAAA2QAAAAAAAAEJAAAAAAAAAO0AAAAAAAAA7QAAAAAAAAEBAAAAAAAAAPEAAAAAAAAA/QA==\",\"dtype\":\"float64\",\"shape\":[245]}}},\"id\":\"c1a4db18-4ef0-4689-a018-1b72b5a00082\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.3},\"fill_color\":{\"value\":\"blue\"},\"line_alpha\":{\"value\":0.3},\"line_color\":{\"value\":\"blue\"},\"size\":{\"units\":\"screen\",\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"cebeb7f4-1ed8-4d49-bad7-d02041c63faf\",\"type\":\"Triangle\"},{\"attributes\":{\"label\":{\"value\":\"MPG 1 stddev\"},\"renderers\":[{\"id\":\"fba834ff-ef18-4dc1-ae52-9f59eda25cad\",\"type\":\"GlyphRenderer\"}]},\"id\":\"1e3140d2-f0fb-4f5d-b42c-1fc840db88a7\",\"type\":\"LegendItem\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"ccaeff4b-4138-484b-9169-06f157506ad2\",\"type\":\"Triangle\"},{\"attributes\":{},\"id\":\"ec3dde08-0dda-4f85-928a-dc2f7839a0d8\",\"type\":\"LinearScale\"},{\"attributes\":{\"source\":{\"id\":\"c1a4db18-4ef0-4689-a018-1b72b5a00082\",\"type\":\"ColumnDataSource\"}},\"id\":\"84b31676-466f-4640-a34f-6a812506dc5b\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"daae8816-1fa0-41df-be48-4a7bfff583e9\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"f57a2636-4881-48e2-8005-70ea3ec3aeba\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"x\",\"top\",\"bottom\"],\"data\":{\"bottom\":{\"__ndarray__\":\"gvFgx2qzKECcKci59t4sQJZdRzm5jipAzvVtn6zMKECki7kXNjswQIpnc6D2pi5ApAV4qVNeL0DtFQi6+rIwQBxLQL6+KTFAWBwW2YNMMkBnDzEy+Oo6QAq856zmjDhAfzfsSXnEOkA=\",\"dtype\":\"float64\",\"shape\":[13]},\"top\":{\"__ndarray__\":\"55jlF2UHN0DAzlQxaMk7QBEIyj5aJjhATTh849zMNUD6TNCFok49QMPUTjgNNTlA1KLp0Ht2O0AT6vdFBQ0+QNr+XjaL9T5AVt48aCfjP0AojYptQ1hEQPSsO6IX6UFAQOQJW8OdQkA=\",\"dtype\":\"float64\",\"shape\":[13]},\"x\":[70,71,72,73,74,75,76,77,78,79,80,81,82]}},\"id\":\"d854109c-0b50-471a-9134-60b5ba2a3962\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"af9bc6fe-132e-4214-b1d3-a5b002c74d23\",\"type\":\"BasicTicker\"},{\"attributes\":{\"dimension\":1,\"plot\":{\"id\":\"704bcd7c-42f7-41ea-a2d7-d8e0e3299002\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"af9bc6fe-132e-4214-b1d3-a5b002c74d23\",\"type\":\"BasicTicker\"}},\"id\":\"590b1700-1aa5-4635-8ffe-1804d02ccca3\",\"type\":\"Grid\"},{\"attributes\":{\"bottom\":{\"field\":\"bottom\"},\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"top\":{\"field\":\"top\"},\"width\":{\"value\":0.8},\"x\":{\"field\":\"x\"}},\"id\":\"0e44703f-763b-4258-b507-76dfb6accbab\",\"type\":\"VBar\"},{\"attributes\":{\"label\":{\"value\":\"American\"},\"renderers\":[{\"id\":\"c4207955-5f24-4609-b912-8db7581eae66\",\"type\":\"GlyphRenderer\"}]},\"id\":\"9b855ca9-05eb-4a51-8b97-ed7bf369571a\",\"type\":\"LegendItem\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"73808e57-ee56-4784-b5bc-f25f207a2a52\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"34d00f3e-5267-47f3-a7e0-fb390246774e\",\"type\":\"PanTool\"},{\"attributes\":{\"data_source\":{\"id\":\"d854109c-0b50-471a-9134-60b5ba2a3962\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"d899c10f-5396-4746-b409-783f1061e2be\",\"type\":\"VBar\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"0e44703f-763b-4258-b507-76dfb6accbab\",\"type\":\"VBar\"},\"selection_glyph\":null,\"view\":{\"id\":\"c13049c1-a395-4b15-b029-33fed9a10a25\",\"type\":\"CDSView\"}},\"id\":\"fba834ff-ef18-4dc1-ae52-9f59eda25cad\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"6a5be5bc-32c3-43d6-998c-e3d2cecb46e7\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"plot\":{\"id\":\"704bcd7c-42f7-41ea-a2d7-d8e0e3299002\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"fc3cb8ed-3702-4544-a19b-6ef38f45584c\",\"type\":\"BasicTicker\"}},\"id\":\"e494c7c7-7b92-42ae-83e2-2422b8ddd46e\",\"type\":\"Grid\"},{\"attributes\":{\"formatter\":{\"id\":\"f57a2636-4881-48e2-8005-70ea3ec3aeba\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"704bcd7c-42f7-41ea-a2d7-d8e0e3299002\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"fc3cb8ed-3702-4544-a19b-6ef38f45584c\",\"type\":\"BasicTicker\"}},\"id\":\"565cc52c-c933-4f2a-aed6-9bf5b8b46ef0\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"fc3cb8ed-3702-4544-a19b-6ef38f45584c\",\"type\":\"BasicTicker\"},{\"attributes\":{\"callback\":null},\"id\":\"709a4435-c70a-419f-a77d-d241a4df5998\",\"type\":\"DataRange1d\"},{\"attributes\":{\"formatter\":{\"id\":\"cfdd2aa7-cb49-4f06-b8b9-0209d81d5c56\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"704bcd7c-42f7-41ea-a2d7-d8e0e3299002\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"af9bc6fe-132e-4214-b1d3-a5b002c74d23\",\"type\":\"BasicTicker\"}},\"id\":\"cc4afa5f-5ab3-4c19-a334-61cb4307be27\",\"type\":\"LinearAxis\"},{\"attributes\":{\"bottom\":{\"field\":\"bottom\"},\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_color\":{\"value\":null},\"top\":{\"field\":\"top\"},\"width\":{\"value\":0.8},\"x\":{\"field\":\"x\"}},\"id\":\"d899c10f-5396-4746-b409-783f1061e2be\",\"type\":\"VBar\"},{\"attributes\":{},\"id\":\"2cc87c9d-0cea-4f54-9bf8-954717164ede\",\"type\":\"LinearScale\"}],\"root_ids\":[\"704bcd7c-42f7-41ea-a2d7-d8e0e3299002\"]},\"title\":\"Bokeh Application\",\"version\":\"0.12.10\"}};\n",
       "    var render_items = [{\"docid\":\"2d01f7f1-9a51-4b93-986b-e30be36436e2\",\"elementid\":\"4aa20eaf-4c3c-4768-b2f8-f1a200fd8dee\",\"modelid\":\"704bcd7c-42f7-41ea-a2d7-d8e0e3299002\"}];\n",
       "\n",
       "    root.Bokeh.embed.embed_items(docs_json, render_items);\n",
       "  }\n",
       "\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    var attempts = 0;\n",
       "    var timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        embed_document(root);\n",
       "        clearInterval(timer);\n",
       "      }\n",
       "      attempts++;\n",
       "      if (attempts > 100) {\n",
       "        console.log(\"Bokeh: ERROR: Unable to embed document because BokehJS library is missing\")\n",
       "        clearInterval(timer);\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "704bcd7c-42f7-41ea-a2d7-d8e0e3299002"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "p = figure(title=\"MPG by Year (Japan and US)\")\n",
    "\n",
    "p.vbar(x=years, bottom=avg-std, top=avg+std, width=0.8, \n",
    "       fill_alpha=0.2, line_color=None, legend=\"MPG 1 stddev\")\n",
    "\n",
    "p.circle(x=japanese[\"yr\"], y=japanese[\"mpg\"], size=10, alpha=0.5,\n",
    "         color=\"red\", legend=\"Japanese\")\n",
    "\n",
    "p.triangle(x=american[\"yr\"], y=american[\"mpg\"], size=10, alpha=0.3,\n",
    "           color=\"blue\", legend=\"American\")\n",
    "\n",
    "p.legend.location = \"top_left\"\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 这种方法可以用来生成其它有趣的图表。这里有更多例子 [Bokeh Documentation Gallery](https://bokeh.pydata.org/en/latest/docs/gallery.html)。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Linked Brushing\n",
    "\n",
    "为了在一个数据层面上关联多个图表，我们可以显式地将数据放置于`ColumnDataSource`。这使得我们可以按名称引用数据列。\n",
    "\n",
    "我们可以使用\"select\"工具在图上选择点，然后其它图上的关联点将高亮显示。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<div class=\"bk-root\">\n",
       "    <div class=\"bk-plotdiv\" id=\"92350fe7-0257-495b-8821-c3c3fbae175e\"></div>\n",
       "</div>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    var docs_json = {\"d03d1cb4-e8b6-4045-b1dc-d30547578bc3\":{\"roots\":{\"references\":[{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"x\":{\"field\":\"yr\"},\"y\":{\"field\":\"mpg\"}},\"id\":\"b52da41b-0a86-4c32-b645-68f1b09266bc\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"3c065bc0-282a-4170-8bd1-67a0c85bd594\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"xs_units\":\"screen\",\"ys_units\":\"screen\"},\"id\":\"5a0d7e3b-76aa-46bc-9c9c-bab77ab0caad\",\"type\":\"PolyAnnotation\"},{\"attributes\":{\"callback\":null,\"overlay\":{\"id\":\"982b7837-f613-4854-acff-0a1b62ad6f40\",\"type\":\"PolyAnnotation\"}},\"id\":\"0e80a46a-6793-4d21-ab2f-03fee32b67ef\",\"type\":\"LassoSelectTool\"},{\"attributes\":{\"fill_color\":{\"value\":null},\"line_color\":{\"value\":\"red\"},\"size\":{\"field\":\"cyl\",\"units\":\"screen\"},\"x\":{\"field\":\"mpg\"},\"y\":{\"field\":\"displ\"}},\"id\":\"76dca847-032c-47ae-8891-d77fa0d721b3\",\"type\":\"Circle\"},{\"attributes\":{\"data_source\":{\"id\":\"0415ebbd-bfea-45af-b05b-7c9189ab6ba8\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"aea026e0-5e77-4d5a-a408-10dea15c2459\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"621129ee-da01-41b2-ac4b-c5b41aef38dd\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"ae620f9c-1d0c-4f97-ac0d-b0fdd36217e7\",\"type\":\"CDSView\"}},\"id\":\"41e15966-48ec-401c-b999-ac2e44ec1420\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"dimension\":1,\"plot\":{\"id\":\"60d236bb-408b-433f-88bc-c647efa12234\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"012b0f09-b0ae-495d-904a-99af7b16def7\",\"type\":\"BasicTicker\"}},\"id\":\"4fa02fc0-66a3-4c93-8fa6-086c2c11e3e6\",\"type\":\"Grid\"},{\"attributes\":{\"overlay\":{\"id\":\"bb38a854-e819-4a46-8fed-ff0a305ac64b\",\"type\":\"BoxAnnotation\"}},\"id\":\"26e2b552-afc7-4c7e-99da-17d1b9565999\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"52712294-2e69-4665-9f45-5dd7211aa59e\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"source\":{\"id\":\"0415ebbd-bfea-45af-b05b-7c9189ab6ba8\",\"type\":\"ColumnDataSource\"}},\"id\":\"ae620f9c-1d0c-4f97-ac0d-b0fdd36217e7\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"fd8ff773-a7c0-4adf-b28b-00a55d3c3f66\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"d8ac7f7f-6024-4859-a893-73f540da3fee\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"plot\":null,\"text\":\"MPG vs. Displacement\"},\"id\":\"3709a9da-55b4-42a3-916e-9dad937d7940\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"819aa085-8f78-4f48-9996-e1a058930a67\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"72e50260-7627-44ca-bbf6-9487a89fd9cc\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"plot\":{\"id\":\"60d236bb-408b-433f-88bc-c647efa12234\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"fd8ff773-a7c0-4adf-b28b-00a55d3c3f66\",\"type\":\"BasicTicker\"}},\"id\":\"25b808c3-7023-4bcc-91d1-b32b7204c9ec\",\"type\":\"Grid\"},{\"attributes\":{\"formatter\":{\"id\":\"953378bd-2162-413f-9049-df2c534f05a6\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"a692f191-155d-4870-b855-bbad439b6d64\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"3b7b7baf-96a0-4a5a-928a-c915524e5d03\",\"type\":\"BasicTicker\"}},\"id\":\"f1a7cc9c-55d5-452f-9147-933c0f9c6aca\",\"type\":\"LinearAxis\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"67948dc6-01b7-4c5d-b192-a7b60fec5859\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"fb5ff1aa-e9b8-4557-a47c-b21ae384ec6b\",\"type\":\"LinearScale\"},{\"attributes\":{\"dimension\":1,\"plot\":{\"id\":\"a692f191-155d-4870-b855-bbad439b6d64\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"1c927716-a883-480c-ac07-7fe9307e6062\",\"type\":\"BasicTicker\"}},\"id\":\"a769f9e4-666f-4ee9-b1f8-14249f8d8614\",\"type\":\"Grid\"},{\"attributes\":{\"callback\":null},\"id\":\"1ccc3412-d59d-4b16-81c9-e27c7622b0e2\",\"type\":\"DataRange1d\"},{\"attributes\":{\"callback\":null},\"id\":\"5e65a9c6-630a-4251-af47-cab347e15138\",\"type\":\"DataRange1d\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"x\":{\"field\":\"hp\"},\"y\":{\"field\":\"displ\"}},\"id\":\"621129ee-da01-41b2-ac4b-c5b41aef38dd\",\"type\":\"Circle\"},{\"attributes\":{\"below\":[{\"id\":\"f1a7cc9c-55d5-452f-9147-933c0f9c6aca\",\"type\":\"LinearAxis\"}],\"left\":[{\"id\":\"1538523d-9206-40c8-820f-62f2553d563d\",\"type\":\"LinearAxis\"}],\"plot_height\":300,\"plot_width\":300,\"renderers\":[{\"id\":\"f1a7cc9c-55d5-452f-9147-933c0f9c6aca\",\"type\":\"LinearAxis\"},{\"id\":\"9ce6b56e-8251-44e5-93d7-f62cbb9a57ba\",\"type\":\"Grid\"},{\"id\":\"1538523d-9206-40c8-820f-62f2553d563d\",\"type\":\"LinearAxis\"},{\"id\":\"a769f9e4-666f-4ee9-b1f8-14249f8d8614\",\"type\":\"Grid\"},{\"id\":\"8a43a203-4701-4644-8902-d9bfee3a86c1\",\"type\":\"BoxAnnotation\"},{\"id\":\"1d8d93f4-4206-40d5-968a-f74a50fab8a1\",\"type\":\"BoxAnnotation\"},{\"id\":\"47aaf482-e5bd-448d-8498-6e06b53af6a6\",\"type\":\"PolyAnnotation\"},{\"id\":\"337057f6-6fd1-4139-a8af-2c82469fd595\",\"type\":\"GlyphRenderer\"}],\"title\":{\"id\":\"3709a9da-55b4-42a3-916e-9dad937d7940\",\"type\":\"Title\"},\"toolbar\":{\"id\":\"3905a4e9-b208-48a5-9155-476baadbe36b\",\"type\":\"Toolbar\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"bab45f5a-3712-45c2-b7d1-5435632c5f8b\",\"type\":\"DataRange1d\"},\"x_scale\":{\"id\":\"819aa085-8f78-4f48-9996-e1a058930a67\",\"type\":\"LinearScale\"},\"y_range\":{\"id\":\"5e65a9c6-630a-4251-af47-cab347e15138\",\"type\":\"DataRange1d\"},\"y_scale\":{\"id\":\"f56cd368-924e-4f1a-ad22-0604cced4842\",\"type\":\"LinearScale\"}},\"id\":\"a692f191-155d-4870-b855-bbad439b6d64\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"bb38a854-e819-4a46-8fed-ff0a305ac64b\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"8b37fe3b-5a9a-4a88-b704-1c8f022236e5\",\"type\":\"LinearScale\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"6822f590-3d2f-48f8-b7ce-543c7ed5eaa0\",\"type\":\"PanTool\"},{\"id\":\"35f9803c-bb61-42f0-bccb-1a0d37edc4ea\",\"type\":\"WheelZoomTool\"},{\"id\":\"d72da4d1-7308-41ca-a2cf-66529ce09466\",\"type\":\"BoxZoomTool\"},{\"id\":\"2ce43207-1b60-4f52-aec4-a337e0d7be8c\",\"type\":\"BoxSelectTool\"},{\"id\":\"17aaf42a-5d55-4a7a-8f28-54d9833862c5\",\"type\":\"LassoSelectTool\"}]},\"id\":\"3905a4e9-b208-48a5-9155-476baadbe36b\",\"type\":\"Toolbar\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"8a43a203-4701-4644-8902-d9bfee3a86c1\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"012b0f09-b0ae-495d-904a-99af7b16def7\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1c927716-a883-480c-ac07-7fe9307e6062\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_color\":{\"value\":\"green\"},\"line_color\":{\"value\":\"green\"},\"x\":{\"field\":\"hp\"},\"y\":{\"field\":\"displ\"}},\"id\":\"aea026e0-5e77-4d5a-a408-10dea15c2459\",\"type\":\"Circle\"},{\"attributes\":{\"below\":[{\"id\":\"983cdd64-a2b2-4765-9578-7713a6d6eaeb\",\"type\":\"LinearAxis\"}],\"left\":[{\"id\":\"e2164107-5779-450c-8a09-e6df9bc77a35\",\"type\":\"LinearAxis\"}],\"plot_height\":300,\"plot_width\":300,\"renderers\":[{\"id\":\"983cdd64-a2b2-4765-9578-7713a6d6eaeb\",\"type\":\"LinearAxis\"},{\"id\":\"25b808c3-7023-4bcc-91d1-b32b7204c9ec\",\"type\":\"Grid\"},{\"id\":\"e2164107-5779-450c-8a09-e6df9bc77a35\",\"type\":\"LinearAxis\"},{\"id\":\"4fa02fc0-66a3-4c93-8fa6-086c2c11e3e6\",\"type\":\"Grid\"},{\"id\":\"bb38a854-e819-4a46-8fed-ff0a305ac64b\",\"type\":\"BoxAnnotation\"},{\"id\":\"67948dc6-01b7-4c5d-b192-a7b60fec5859\",\"type\":\"BoxAnnotation\"},{\"id\":\"5a0d7e3b-76aa-46bc-9c9c-bab77ab0caad\",\"type\":\"PolyAnnotation\"},{\"id\":\"41e15966-48ec-401c-b999-ac2e44ec1420\",\"type\":\"GlyphRenderer\"}],\"title\":{\"id\":\"82ed6649-0aae-41a0-a6b8-0cc110994c21\",\"type\":\"Title\"},\"toolbar\":{\"id\":\"f8ac4751-2926-4ef3-a83b-51d629f84525\",\"type\":\"Toolbar\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"1ccc3412-d59d-4b16-81c9-e27c7622b0e2\",\"type\":\"DataRange1d\"},\"x_scale\":{\"id\":\"fb5ff1aa-e9b8-4557-a47c-b21ae384ec6b\",\"type\":\"LinearScale\"},\"y_range\":{\"id\":\"25a14f15-bf7b-4864-ac05-47c64afb8cb2\",\"type\":\"DataRange1d\"},\"y_scale\":{\"id\":\"8b37fe3b-5a9a-4a88-b704-1c8f022236e5\",\"type\":\"LinearScale\"}},\"id\":\"60d236bb-408b-433f-88bc-c647efa12234\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"formatter\":{\"id\":\"03183f34-b7a2-4680-964e-1b201d38b483\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"a692f191-155d-4870-b855-bbad439b6d64\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"1c927716-a883-480c-ac07-7fe9307e6062\",\"type\":\"BasicTicker\"}},\"id\":\"1538523d-9206-40c8-820f-62f2553d563d\",\"type\":\"LinearAxis\"},{\"attributes\":{\"callback\":null},\"id\":\"bab45f5a-3712-45c2-b7d1-5435632c5f8b\",\"type\":\"DataRange1d\"},{\"attributes\":{\"formatter\":{\"id\":\"72e50260-7627-44ca-bbf6-9487a89fd9cc\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"60d236bb-408b-433f-88bc-c647efa12234\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"fd8ff773-a7c0-4adf-b28b-00a55d3c3f66\",\"type\":\"BasicTicker\"}},\"id\":\"983cdd64-a2b2-4765-9578-7713a6d6eaeb\",\"type\":\"LinearAxis\"},{\"attributes\":{\"plot\":null,\"text\":\"HP vs. Displacement\"},\"id\":\"82ed6649-0aae-41a0-a6b8-0cc110994c21\",\"type\":\"Title\"},{\"attributes\":{\"plot\":{\"id\":\"a692f191-155d-4870-b855-bbad439b6d64\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"3b7b7baf-96a0-4a5a-928a-c915524e5d03\",\"type\":\"BasicTicker\"}},\"id\":\"9ce6b56e-8251-44e5-93d7-f62cbb9a57ba\",\"type\":\"Grid\"},{\"attributes\":{\"children\":[{\"id\":\"fe47d169-6946-46d8-b929-d2f6ea6638a3\",\"type\":\"Column\"},{\"id\":\"049be8b0-0339-4fa7-b0e6-c7042ffc2b23\",\"type\":\"ToolbarBox\"}]},\"id\":\"3bd921ca-ff61-4d4d-990b-3315bdc50fc5\",\"type\":\"Row\"},{\"attributes\":{\"callback\":null},\"id\":\"25a14f15-bf7b-4864-ac05-47c64afb8cb2\",\"type\":\"DataRange1d\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"63baed75-c630-4d52-bbc0-3d39f217d868\",\"type\":\"PanTool\"},{\"id\":\"d8ac7f7f-6024-4859-a893-73f540da3fee\",\"type\":\"WheelZoomTool\"},{\"id\":\"26e2b552-afc7-4c7e-99da-17d1b9565999\",\"type\":\"BoxZoomTool\"},{\"id\":\"0ecf10bf-167d-442c-9df5-35cc998535f2\",\"type\":\"BoxSelectTool\"},{\"id\":\"3ceadcdb-9a42-43b6-9841-666173a5de35\",\"type\":\"LassoSelectTool\"}]},\"id\":\"f8ac4751-2926-4ef3-a83b-51d629f84525\",\"type\":\"Toolbar\"},{\"attributes\":{\"callback\":null,\"overlay\":{\"id\":\"47aaf482-e5bd-448d-8498-6e06b53af6a6\",\"type\":\"PolyAnnotation\"}},\"id\":\"17aaf42a-5d55-4a7a-8f28-54d9833862c5\",\"type\":\"LassoSelectTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"xs_units\":\"screen\",\"ys_units\":\"screen\"},\"id\":\"982b7837-f613-4854-acff-0a1b62ad6f40\",\"type\":\"PolyAnnotation\"},{\"attributes\":{\"formatter\":{\"id\":\"3c065bc0-282a-4170-8bd1-67a0c85bd594\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"60d236bb-408b-433f-88bc-c647efa12234\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"012b0f09-b0ae-495d-904a-99af7b16def7\",\"type\":\"BasicTicker\"}},\"id\":\"e2164107-5779-450c-8a09-e6df9bc77a35\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"360a833a-93fe-4ce5-8c62-ec812810fa41\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"3b7b7baf-96a0-4a5a-928a-c915524e5d03\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"field\":\"cyl\",\"units\":\"screen\"},\"x\":{\"field\":\"mpg\"},\"y\":{\"field\":\"displ\"}},\"id\":\"c157de40-b916-474a-8568-948bba9362bd\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"6822f590-3d2f-48f8-b7ce-543c7ed5eaa0\",\"type\":\"PanTool\"},{\"attributes\":{\"callback\":null,\"overlay\":{\"id\":\"1d8d93f4-4206-40d5-968a-f74a50fab8a1\",\"type\":\"BoxAnnotation\"},\"renderers\":[{\"id\":\"337057f6-6fd1-4139-a8af-2c82469fd595\",\"type\":\"GlyphRenderer\"}]},\"id\":\"2ce43207-1b60-4f52-aec4-a337e0d7be8c\",\"type\":\"BoxSelectTool\"},{\"attributes\":{\"overlay\":{\"id\":\"8a43a203-4701-4644-8902-d9bfee3a86c1\",\"type\":\"BoxAnnotation\"}},\"id\":\"d72da4d1-7308-41ca-a2cf-66529ce09466\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"35f9803c-bb61-42f0-bccb-1a0d37edc4ea\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"xs_units\":\"screen\",\"ys_units\":\"screen\"},\"id\":\"47aaf482-e5bd-448d-8498-6e06b53af6a6\",\"type\":\"PolyAnnotation\"},{\"attributes\":{},\"id\":\"f56cd368-924e-4f1a-ad22-0604cced4842\",\"type\":\"LinearScale\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"mpg\",\"cyl\",\"displ\",\"hp\",\"weight\",\"acc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GxAAAAAAABAWEAAAAAAAMBgQAAAAAAAAF5AAAAAAADAXUAAAAAAAABbQAAAAAAAgFVAAAAAAACAY0AAAAAAAEBVQAAAAAAAgFZAAAAAAACAVkAAAAAAAEBeQAAAAAAAQGJAAAAAAADAVkAAAAAAAEBYQAAAAAAAQFZAAAAAAAAAZUAAAAAAAIBRQAAAAAAAgF5AAAAAAADAWkAAAAAAAOBgQAAAAAAA4GJAAAAAAACAY0AAAAAAAKBlQAAAAAAA4GBAAAAAAADAU0AAAAAAAIBVQAAAAAAAQFRAAAAAAABAWEAAAAAAAEBVQAAAAAAAQFZAAAAAAADAVkAAAAAAAEBaQAAAAAAAgFhAAAAAAACAWEAAAAAAAEBaQAAAAAAAwFpAAAAAAAAAW0AAAAAAAMBdQAAAAAAAAF5AAAAAAACgYUAAAAAAACBiQAAAAAAAAGVAAAAAAABAYkAAAAAAAOBsQAAAAAAA4HVAAAAAAAAAaUAAAAAAACBsQAAAAAAAAFxAAAAAAAAAXEAAAAAAAABcQAAAAAAAAFxAAAAAAADgYEAAAAAAAOBiQAAAAAAAgGFAAAAAAABAWkAAAAAAAMBWQAAAAAAAwFZAAAAAAABAWkAAAAAAAIBYQAAAAAAAAF5AAAAAAADAWkAAAAAAAABbQAAAAAAAwFZAAAAAAADAVkAAAAAAAMBWQAAAAAAAoGZAAAAAAABgcEAAAAAAAIBjQAAAAAAAAG1AAAAAAAAAYkAAAAAAAOBgQAAAAAAA4GJAAAAAAACAYUAAAAAAAEBYQAAAAAAA4GBAAAAAAAAAXkAAAAAAAMBdQA==\",\"dtype\":\"float64\",\"shape\":[392]},\"hp\":[130,165,150,150,140,198,220,215,225,190,170,160,150,225,95,95,97,85,88,46,87,90,95,113,90,215,200,210,193,88,90,95,100,105,100,88,100,165,175,153,150,180,170,175,110,72,100,88,86,90,70,76,65,69,60,70,95,80,54,90,86,165,175,150,153,150,208,155,160,190,97,150,130,140,150,112,76,87,69,86,92,97,80,88,175,150,145,137,150,198,150,158,150,215,225,175,105,100,100,88,95,46,150,167,170,180,100,88,72,94,90,85,107,90,145,230,49,75,91,112,150,110,122,180,95,100,100,67,80,65,75,100,110,105,140,150,150,140,150,83,67,78,52,61,75,75,75,97,93,67,95,105,72,72,170,145,150,148,110,105,110,95,110,110,129,75,83,100,78,96,71,97,97,70,90,95,88,98,115,53,86,81,92,79,83,140,150,120,152,100,105,81,90,52,60,70,53,100,78,110,95,71,70,75,72,102,150,88,108,120,180,145,130,150,68,80,58,96,70,145,110,145,130,110,105,100,98,180,170,190,149,78,88,75,89,63,83,67,78,97,110,110,48,66,52,70,60,110,140,139,105,95,85,88,100,90,105,85,110,120,145,165,139,140,68,95,97,75,95,105,85,97,103,125,115,133,71,68,115,85,88,90,110,130,129,138,135,155,142,125,150,71,65,80,80,77,125,71,90,70,70,65,69,90,115,115,90,76,60,70,65,90,88,90,90,78,90,75,92,75,65,105,65,48,48,67,67,67,67,62,132,100,88,72,84,84,92,110,84,58,64,60,67,65,62,68,63,65,65,74,75,75,100,74,80,76,116,120,110,105,88,85,88,88,88,85,84,90,92,74,68,68,63,70,88,75,70,67,67,67,110,85,92,112,96,84,90,86,52,84,79,82],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391],\"mpg\":{\"__ndarray__\":\"AAAAAAAAMkAAAAAAAAAuQAAAAAAAADJAAAAAAAAAMEAAAAAAAAAxQAAAAAAAAC5AAAAAAAAALEAAAAAAAAAsQAAAAAAAACxAAAAAAAAALkAAAAAAAAAuQAAAAAAAACxAAAAAAAAALkAAAAAAAAAsQAAAAAAAADhAAAAAAAAANkAAAAAAAAAyQAAAAAAAADVAAAAAAAAAO0AAAAAAAAA6QAAAAAAAADlAAAAAAAAAOEAAAAAAAAA5QAAAAAAAADpAAAAAAAAANUAAAAAAAAAkQAAAAAAAACRAAAAAAAAAJkAAAAAAAAAiQAAAAAAAADtAAAAAAAAAPEAAAAAAAAA5QAAAAAAAADNAAAAAAAAAMEAAAAAAAAAxQAAAAAAAADNAAAAAAAAAMkAAAAAAAAAsQAAAAAAAACxAAAAAAAAALEAAAAAAAAAsQAAAAAAAAChAAAAAAAAAKkAAAAAAAAAqQAAAAAAAADJAAAAAAAAANkAAAAAAAAAzQAAAAAAAADJAAAAAAAAAN0AAAAAAAAA8QAAAAAAAAD5AAAAAAAAAPkAAAAAAAAA/QAAAAAAAgEFAAAAAAAAAO0AAAAAAAAA6QAAAAAAAADhAAAAAAAAAOUAAAAAAAAA3QAAAAAAAADRAAAAAAAAANUAAAAAAAAAqQAAAAAAAACx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ZmZmZmTpAMzMzMzMzNECamZmZmZkxQAAAAAAAADxAAAAAAAAAO0AAAAAAAABBQAAAAAAAAD9AAAAAAAAAPUAAAAAAAAA7QAAAAAAAADhAAAAAAAAAQkAAAAAAAIBCQAAAAAAAAD9AAAAAAAAAQ0AAAAAAAABCQAAAAAAAAEJAAAAAAAAAQkAAAAAAAABBQAAAAAAAAENAAAAAAAAAQEAAAAAAAABDQAAAAAAAADlAAAAAAAAAQ0AAAAAAAAA6QAAAAAAAADZAAAAAAAAAQEAAAAAAAABCQAAAAAAAADtAAAAAAAAAO0AAAAAAAABGQAAAAAAAAEBAAAAAAAAAPEAAAAAAAAA/QA==\",\"dtype\":\"float64\",\"shape\":[392]},\"name\":[\"chevrolet chevelle malibu\",\"buick skylark 320\",\"plymouth satellite\",\"amc rebel sst\",\"ford torino\",\"ford galaxie 500\",\"chevrolet impala\",\"plymouth fury iii\",\"pontiac catalina\",\"amc ambassador dpl\",\"dodge challenger se\",\"plymouth 'cuda 340\",\"chevrolet monte carlo\",\"buick estate wagon (sw)\",\"toyota corona mark ii\",\"plymouth duster\",\"amc hornet\",\"ford maverick\",\"datsun pl510\",\"volkswagen 1131 deluxe sedan\",\"peugeot 504\",\"audi 100 ls\",\"saab 99e\",\"bmw 2002\",\"amc gremlin\",\"ford f250\",\"chevy c20\",\"dodge d200\",\"hi 1200d\",\"datsun pl510\",\"chevrolet vega 2300\",\"toyota corona\",\"amc gremlin\",\"plymouth satellite custom\",\"chevrolet chevelle malibu\",\"ford torino 500\",\"amc matador\",\"chevrolet impala\",\"pontiac catalina brougham\",\"ford galaxie 500\",\"plymouth fury iii\",\"dodge monaco (sw)\",\"ford country squire (sw)\",\"pontiac safari (sw)\",\"amc hornet sportabout (sw)\",\"chevrolet vega (sw)\",\"pontiac firebird\",\"ford mustang\",\"mercury capri 2000\",\"opel 1900\",\"peugeot 304\",\"fiat 124b\",\"toyota corolla 1200\",\"datsun 1200\",\"volkswagen model 111\",\"plymouth cricket\",\"toyota corona hardtop\",\"dodge colt hardtop\",\"volkswagen type 3\",\"chevrolet vega\",\"ford pinto runabout\",\"chevrolet impala\",\"pontiac catalina\",\"plymouth fury iii\",\"ford galaxie 500\",\"amc ambassador sst\",\"mercury marquis\",\"buick lesabre custom\",\"oldsmobile delta 88 royale\",\"chrysler newport royal\",\"mazda rx2 coupe\",\"amc matador (sw)\",\"chevrolet chevelle concours (sw)\",\"ford gran torino (sw)\",\"plymouth satellite custom (sw)\",\"volvo 145e (sw)\",\"volkswagen 411 (sw)\",\"peugeot 504 (sw)\",\"renault 12 (sw)\",\"ford pinto (sw)\",\"datsun 510 (sw)\",\"toyouta corona mark ii (sw)\",\"dodge colt (sw)\",\"toyota corolla 1600 (sw)\",\"buick century 350\",\"amc matador\",\"chevrolet malibu\",\"ford gran torino\",\"dodge coronet custom\",\"mercury marquis brougham\",\"chevrolet caprice classic\",\"ford ltd\",\"plymouth fury gran sedan\",\"chrysler new yorker brougham\",\"buick electra 225 custom\",\"amc ambassador brougham\",\"plymouth valiant\",\"chevrolet nova custom\",\"amc hornet\",\"ford maverick\",\"plymouth duster\",\"volkswagen super beetle\",\"chevrolet impala\",\"ford country\",\"plymouth custom suburb\",\"oldsmobile vista cruiser\",\"amc gremlin\",\"toyota carina\",\"chevrolet vega\",\"datsun 610\",\"maxda rx3\",\"ford pinto\",\"mercury capri v6\",\"fiat 124 sport coupe\",\"chevrolet monte carlo s\",\"pontiac grand prix\",\"fiat 128\",\"opel manta\",\"audi 100ls\",\"volvo 144ea\",\"dodge dart custom\",\"saab 99le\",\"toyota mark ii\",\"oldsmobile omega\",\"plymouth duster\",\"amc hornet\",\"chevrolet nova\",\"datsun b210\",\"ford pinto\",\"toyota corolla 1200\",\"chevrolet vega\",\"chevrolet chevelle malibu classic\",\"amc matador\",\"plymouth satellite sebring\",\"ford gran torino\",\"buick century luxus (sw)\",\"dodge coronet custom (sw)\",\"ford gran torino (sw)\",\"amc matador (sw)\",\"audi fox\",\"volkswagen dasher\",\"opel manta\",\"toyota corona\",\"datsun 710\",\"dodge colt\",\"fiat 128\",\"fiat 124 tc\",\"honda civic\",\"subaru\",\"fiat x1.9\",\"plymouth valiant custom\",\"chevrolet nova\",\"mercury monarch\",\"ford maverick\",\"pontiac catalina\",\"chevrolet bel air\",\"plymouth grand fury\",\"ford ltd\",\"buick century\",\"chevroelt chevelle malibu\",\"amc matador\",\"plymouth fury\",\"buick skyhawk\",\"chevrolet monza 2+2\",\"ford mustang ii\",\"toyota corolla\",\"ford pinto\",\"amc gremlin\",\"pontiac astro\",\"toyota corona\",\"volkswagen dasher\",\"datsun 710\",\"ford pinto\",\"volkswagen rabbit\",\"amc pacer\",\"audi 100ls\",\"peugeot 504\",\"volvo 244dl\",\"saab 99le\",\"honda civic cvcc\",\"fiat 131\",\"opel 1900\",\"capri ii\",\"dodge colt\",\"renault 12tl\",\"chevrolet chevelle malibu classic\",\"dodge coronet brougham\",\"amc matador\",\"ford gran torino\",\"plymouth valiant\",\"chevrolet nova\",\"ford maverick\",\"amc hornet\",\"chevrolet chevette\",\"chevrolet woody\",\"vw rabbit\",\"honda civic\",\"dodge aspen se\",\"ford granada ghia\",\"pontiac ventura sj\",\"amc pacer d/l\",\"volkswagen rabbit\",\"datsun b-210\",\"toyota corolla\",\"ford pinto\",\"volvo 245\",\"plymouth volare premier v8\",\"peugeot 504\",\"toyota mark ii\",\"mercedes-benz 280s\",\"cadillac seville\",\"chevy c10\",\"ford f108\",\"dodge d100\",\"honda accord cvcc\",\"buick opel isuzu deluxe\",\"renault 5 gtl\",\"plymouth arrow gs\",\"datsun f-10 hatchback\",\"chevrolet caprice classic\",\"oldsmobile cutlass supreme\",\"dodge monaco brougham\",\"mercury cougar brougham\",\"chevrolet concours\",\"buick skylark\",\"plymouth volare custom\",\"ford granada\",\"pontiac grand prix lj\",\"chevrolet monte carlo landau\",\"chrysler cordoba\",\"ford thunderbird\",\"volkswagen rabbit custom\",\"pontiac sunbird coupe\",\"toyota corolla liftback\",\"ford mustang ii 2+2\",\"chevrolet chevette\",\"dodge colt m/m\",\"subaru dl\",\"volkswagen dasher\",\"datsun 810\",\"bmw 320i\",\"mazda rx-4\",\"volkswagen rabbit custom diesel\",\"ford fiesta\",\"mazda glc deluxe\",\"datsun b210 gx\",\"honda civic cvcc\",\"oldsmobile cutlass salon brougham\",\"dodge diplomat\",\"mercury monarch ghia\",\"pontiac phoenix lj\",\"chevrolet malibu\",\"ford fairmont (auto)\",\"ford fairmont (man)\",\"plymouth volare\",\"amc concord\",\"buick century special\",\"mercury zephyr\",\"dodge aspen\",\"amc concord d/l\",\"chevrolet monte carlo landau\",\"buick regal sport coupe (turbo)\",\"ford futura\",\"dodge magnum xe\",\"chevrolet chevette\",\"toyota corona\",\"datsun 510\",\"dodge omni\",\"toyota celica gt liftback\",\"plymouth sapporo\",\"oldsmobile starfire sx\",\"datsun 200-sx\",\"audi 5000\",\"volvo 264gl\",\"saab 99gle\",\"peugeot 604sl\",\"volkswagen scirocco\",\"honda accord lx\",\"pontiac lemans v6\",\"mercury zephyr 6\",\"ford fairmont 4\",\"amc concord dl 6\",\"dodge aspen 6\",\"chevrolet caprice classic\",\"ford ltd landau\",\"mercury grand marquis\",\"dodge st. regis\",\"buick estate wagon (sw)\",\"ford country squire (sw)\",\"chevrolet malibu classic (sw)\",\"chrysler lebaron town @ country (sw)\",\"vw rabbit custom\",\"maxda glc deluxe\",\"dodge colt hatchback custom\",\"amc spirit dl\",\"mercedes benz 300d\",\"cadillac eldorado\",\"peugeot 504\",\"oldsmobile cutlass salon brougham\",\"plymouth horizon\",\"plymouth horizon tc3\",\"datsun 210\",\"fiat strada custom\",\"buick skylark limited\",\"chevrolet citation\",\"oldsmobile omega brougham\",\"pontiac phoenix\",\"vw rabbit\",\"toyota corolla tercel\",\"chevrolet chevette\",\"datsun 310\",\"chevrolet citation\",\"ford fairmont\",\"amc concord\",\"dodge aspen\",\"audi 4000\",\"toyota corona liftback\",\"mazda 626\",\"datsun 510 hatchback\",\"toyota corolla\",\"mazda glc\",\"dodge colt\",\"datsun 210\",\"vw rabbit c (diesel)\",\"vw dasher (diesel)\",\"audi 5000s (diesel)\",\"mercedes-benz 240d\",\"honda civic 1500 gl\",\"subaru dl\",\"vokswagen rabbit\",\"datsun 280-zx\",\"mazda rx-7 gs\",\"triumph tr7 coupe\",\"honda accord\",\"plymouth reliant\",\"buick skylark\",\"dodge aries wagon (sw)\",\"chevrolet citation\",\"plymouth reliant\",\"toyota starlet\",\"plymouth champ\",\"honda civic 1300\",\"subaru\",\"datsun 210 mpg\",\"toyota tercel\",\"mazda glc 4\",\"plymouth horizon 4\",\"ford escort 4w\",\"ford escort 2h\",\"volkswagen jetta\",\"honda prelude\",\"toyota corolla\",\"datsun 200sx\",\"mazda 626\",\"peugeot 505s turbo diesel\",\"volvo diesel\",\"toyota cressida\",\"datsun 810 maxima\",\"buick century\",\"oldsmobile cutlass ls\",\"ford granada gl\",\"chrysler lebaron salon\",\"chevrolet cavalier\",\"chevrolet cavalier wagon\",\"chevrolet cavalier 2-door\",\"pontiac j2000 se hatchback\",\"dodge aries se\",\"pontiac phoenix\",\"ford fairmont futura\",\"volkswagen rabbit l\",\"mazda glc custom l\",\"mazda glc custom\",\"plymouth horizon miser\",\"mercury lynx l\",\"nissan stanza xe\",\"honda accord\",\"toyota corolla\",\"honda civic\",\"honda civic (auto)\",\"datsun 310 gx\",\"buick century limited\",\"oldsmobile cutlass ciera (diesel)\",\"chrysler lebaron medallion\",\"ford granada l\",\"toyota celica gt\",\"dodge charger 2.2\",\"chevrolet camaro\",\"ford mustang gl\",\"vw pickup\",\"dodge rampage\",\"ford ranger\",\"chevy s-10\"],\"origin\":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,1,1,3,2,2,2,2,2,1,1,1,1,1,3,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,3,3,2,1,3,1,2,1,1,1,1,1,1,1,1,1,1,1,3,1,1,1,1,2,2,2,2,1,3,3,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,3,1,3,3,1,1,2,1,1,2,2,2,2,1,2,3,1,1,1,1,3,1,3,1,1,1,1,1,1,1,1,1,2,2,2,3,3,1,2,2,3,3,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,1,1,3,2,3,1,2,1,2,2,2,2,3,2,2,1,1,2,1,1,1,1,1,1,1,1,1,1,2,3,1,1,1,1,2,3,3,1,2,1,2,3,2,1,1,1,1,3,1,2,1,3,1,1,1,1,1,1,1,1,1,1,1,1,2,1,3,1,1,1,3,2,3,2,3,2,1,3,3,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,1,3,1,1,3,2,2,2,2,2,3,1,1,1,1,1,1,1,1,1,1,1,1,1,2,3,1,1,2,1,2,1,1,1,3,2,1,1,1,1,2,3,1,3,1,1,1,1,2,3,3,3,3,3,1,3,2,2,2,2,3,3,2,3,3,2,3,1,1,1,1,1,3,1,3,3,3,3,3,1,1,1,2,3,3,3,3,2,2,3,3,1,1,1,1,1,1,1,1,1,1,1,2,3,3,1,1,3,3,3,3,3,3,1,1,1,1,3,1,1,1,2,1,1,1],\"weight\":[3504,3693,3436,3433,3449,4341,4354,4312,4425,3850,3563,3609,3761,3086,2372,2833,2774,2587,2130,1835,2672,2430,2375,2234,2648,4615,4376,4382,4732,2130,2264,2228,2634,3439,3329,3302,3288,4209,4464,4154,4096,4955,4746,5140,2962,2408,3282,3139,2220,2123,2074,2065,1773,1613,1834,1955,2278,2126,2254,2408,2226,4274,4385,4135,4129,3672,4633,4502,4456,4422,2330,3892,4098,4294,4077,2933,2511,2979,2189,2395,2288,2506,2164,2100,4100,3672,3988,4042,3777,4952,4464,4363,4237,4735,4951,3821,3121,3278,2945,3021,2904,1950,4997,4906,4654,4499,2789,2279,2401,2379,2124,2310,2472,2265,4082,4278,1867,2158,2582,2868,3399,2660,2807,3664,3102,2901,3336,1950,2451,1836,2542,3781,3632,3613,4141,4699,4457,4638,4257,2219,1963,2300,1649,2003,2125,2108,2246,2489,2391,2000,3264,3459,3432,3158,4668,4440,4498,4657,3907,3897,3730,3785,3039,3221,3169,2171,2639,2914,2592,2702,2223,2545,2984,1937,3211,2694,2957,2945,2671,1795,2464,2220,2572,2255,2202,4215,4190,3962,4215,3233,3353,3012,3085,2035,2164,1937,1795,3651,3574,3645,3193,1825,1990,2155,2565,3150,3940,3270,2930,3820,4380,4055,3870,3755,2045,2155,1825,2300,1945,3880,4060,4140,4295,3520,3425,3630,3525,4220,4165,4325,4335,1940,2740,2265,2755,2051,2075,1985,2190,2815,2600,2720,1985,1800,1985,2070,1800,3365,3735,3570,3535,3155,2965,2720,3430,3210,3380,3070,3620,3410,3425,3445,3205,4080,2155,2560,2300,2230,2515,2745,2855,2405,2830,3140,2795,3410,1990,2135,3245,2990,2890,3265,3360,3840,3725,3955,3830,4360,4054,3605,3940,1925,1975,1915,2670,3530,3900,3190,3420,2200,2150,2020,2130,2670,2595,2700,2556,2144,1968,2120,2019,2678,2870,3003,3381,2188,2711,2542,2434,2265,2110,2800,2110,2085,2335,2950,3250,1850,2145,1845,2910,2420,2500,2290,2490,2635,2620,2725,2385,1755,1875,1760,2065,1975,2050,1985,2215,2045,2380,2190,2210,2350,2615,2635,3230,3160,2900,2930,3415,3725,3060,3465,2605,2640,2395,2575,2525,2735,2865,1980,2025,1970,2125,2125,2160,2205,2245,1965,1965,1995,2945,3015,2585,2835,2665,2370,2950,2790,2130,2295,2625,2720],\"yr\":[70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82]}},\"id\":\"0415ebbd-bfea-45af-b05b-7c9189ab6ba8\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"03183f34-b7a2-4680-964e-1b201d38b483\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"children\":[{\"id\":\"be104740-39d7-4a38-a589-669c0a7df8a8\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"id\":\"60d236bb-408b-433f-88bc-c647efa12234\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"id\":\"a692f191-155d-4870-b855-bbad439b6d64\",\"subtype\":\"Figure\",\"type\":\"Plot\"}]},\"id\":\"85b8e72e-9438-402c-bafd-019ed585d41e\",\"type\":\"Row\"},{\"attributes\":{\"dimension\":1,\"plot\":{\"id\":\"be104740-39d7-4a38-a589-669c0a7df8a8\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"be3c808d-5ce7-4539-bce9-a3d92319ff62\",\"type\":\"BasicTicker\"}},\"id\":\"7cbd22ad-f56b-4bed-b349-e03f2c045c38\",\"type\":\"Grid\"},{\"attributes\":{\"data_source\":{\"id\":\"0415ebbd-bfea-45af-b05b-7c9189ab6ba8\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"76dca847-032c-47ae-8891-d77fa0d721b3\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"c157de40-b916-474a-8568-948bba9362bd\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"cca2a754-b397-47e1-9a76-bd1ae31a5e75\",\"type\":\"CDSView\"}},\"id\":\"337057f6-6fd1-4139-a8af-2c82469fd595\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"be3c808d-5ce7-4539-bce9-a3d92319ff62\",\"type\":\"BasicTicker\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"dfee3eea-2c74-4faf-a8d0-539a382eca7c\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"1d8d93f4-4206-40d5-968a-f74a50fab8a1\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"below\":[{\"id\":\"a23d3cde-9903-4616-a4b7-ef335f50c54e\",\"type\":\"LinearAxis\"}],\"left\":[{\"id\":\"e06d4008-b678-4ba1-ad51-66bb4217e1f5\",\"type\":\"LinearAxis\"}],\"plot_height\":300,\"plot_width\":300,\"renderers\":[{\"id\":\"a23d3cde-9903-4616-a4b7-ef335f50c54e\",\"type\":\"LinearAxis\"},{\"id\":\"49442b86-1bd2-412f-8f6e-0b6ef3304c35\",\"type\":\"Grid\"},{\"id\":\"e06d4008-b678-4ba1-ad51-66bb4217e1f5\",\"type\":\"LinearAxis\"},{\"id\":\"7cbd22ad-f56b-4bed-b349-e03f2c045c38\",\"type\":\"Grid\"},{\"id\":\"dfee3eea-2c74-4faf-a8d0-539a382eca7c\",\"type\":\"BoxAnnotation\"},{\"id\":\"c5976348-866e-4bbf-856a-7820bc68837e\",\"type\":\"BoxAnnotation\"},{\"id\":\"982b7837-f613-4854-acff-0a1b62ad6f40\",\"type\":\"PolyAnnotation\"},{\"id\":\"c88b6103-737c-4cca-b02d-cbff8272fc91\",\"type\":\"GlyphRenderer\"}],\"title\":{\"id\":\"f4db2467-d5dc-4bb1-b5bd-a1b1ef94e19c\",\"type\":\"Title\"},\"toolbar\":{\"id\":\"a6c68036-1ff7-4602-a394-88fa5404af9c\",\"type\":\"Toolbar\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"84a3a13c-7290-44a9-82ee-03f108bcd7d4\",\"type\":\"DataRange1d\"},\"x_scale\":{\"id\":\"93d7845f-b79a-46f7-8c42-68bdc965c20a\",\"type\":\"LinearScale\"},\"y_range\":{\"id\":\"5287175f-c9f8-411d-89ff-7af23328007d\",\"type\":\"DataRange1d\"},\"y_scale\":{\"id\":\"6bf9df85-46e6-463b-a024-4c9290f6c5c1\",\"type\":\"LinearScale\"}},\"id\":\"be104740-39d7-4a38-a589-669c0a7df8a8\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"sizing_mode\":\"scale_width\",\"tools\":[{\"id\":\"8a3d8c55-da28-4276-a2a6-97a5a2fd9f8c\",\"type\":\"PanTool\"},{\"id\":\"ae217198-5fdc-449f-a66d-e522180b530e\",\"type\":\"WheelZoomTool\"},{\"id\":\"58306f51-8623-4940-82f3-edd6d2af4f20\",\"type\":\"BoxZoomTool\"},{\"id\":\"e26a8db7-cd90-4b5c-9e91-35d9786e01c3\",\"type\":\"BoxSelectTool\"},{\"id\":\"0e80a46a-6793-4d21-ab2f-03fee32b67ef\",\"type\":\"LassoSelectTool\"},{\"id\":\"63baed75-c630-4d52-bbc0-3d39f217d868\",\"type\":\"PanTool\"},{\"id\":\"d8ac7f7f-6024-4859-a893-73f540da3fee\",\"type\":\"WheelZoomTool\"},{\"id\":\"26e2b552-afc7-4c7e-99da-17d1b9565999\",\"type\":\"BoxZoomTool\"},{\"id\":\"0ecf10bf-167d-442c-9df5-35cc998535f2\",\"type\":\"BoxSelectTool\"},{\"id\":\"3ceadcdb-9a42-43b6-9841-666173a5de35\",\"type\":\"LassoSelectTool\"},{\"id\":\"6822f590-3d2f-48f8-b7ce-543c7ed5eaa0\",\"type\":\"PanTool\"},{\"id\":\"35f9803c-bb61-42f0-bccb-1a0d37edc4ea\",\"type\":\"WheelZoomTool\"},{\"id\":\"d72da4d1-7308-41ca-a2cf-66529ce09466\",\"type\":\"BoxZoomTool\"},{\"id\":\"2ce43207-1b60-4f52-aec4-a337e0d7be8c\",\"type\":\"BoxSelectTool\"},{\"id\":\"17aaf42a-5d55-4a7a-8f28-54d9833862c5\",\"type\":\"LassoSelectTool\"}]},\"id\":\"049be8b0-0339-4fa7-b0e6-c7042ffc2b23\",\"type\":\"ToolbarBox\"},{\"attributes\":{},\"id\":\"7fac5a59-fb65-408c-ba63-302c3d868b51\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"93d7845f-b79a-46f7-8c42-68bdc965c20a\",\"type\":\"LinearScale\"},{\"attributes\":{\"source\":{\"id\":\"0415ebbd-bfea-45af-b05b-7c9189ab6ba8\",\"type\":\"ColumnDataSource\"}},\"id\":\"cca2a754-b397-47e1-9a76-bd1ae31a5e75\",\"type\":\"CDSView\"},{\"attributes\":{\"formatter\":{\"id\":\"360a833a-93fe-4ce5-8c62-ec812810fa41\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"be104740-39d7-4a38-a589-669c0a7df8a8\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"be3c808d-5ce7-4539-bce9-a3d92319ff62\",\"type\":\"BasicTicker\"}},\"id\":\"e06d4008-b678-4ba1-ad51-66bb4217e1f5\",\"type\":\"LinearAxis\"},{\"attributes\":{\"plot\":null,\"text\":\"MPG by Year\"},\"id\":\"f4db2467-d5dc-4bb1-b5bd-a1b1ef94e19c\",\"type\":\"Title\"},{\"attributes\":{\"callback\":null},\"id\":\"84a3a13c-7290-44a9-82ee-03f108bcd7d4\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"953378bd-2162-413f-9049-df2c534f05a6\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"8a3d8c55-da28-4276-a2a6-97a5a2fd9f8c\",\"type\":\"PanTool\"},{\"id\":\"ae217198-5fdc-449f-a66d-e522180b530e\",\"type\":\"WheelZoomTool\"},{\"id\":\"58306f51-8623-4940-82f3-edd6d2af4f20\",\"type\":\"BoxZoomTool\"},{\"id\":\"e26a8db7-cd90-4b5c-9e91-35d9786e01c3\",\"type\":\"BoxSelectTool\"},{\"id\":\"0e80a46a-6793-4d21-ab2f-03fee32b67ef\",\"type\":\"LassoSelectTool\"}]},\"id\":\"a6c68036-1ff7-4602-a394-88fa5404af9c\",\"type\":\"Toolbar\"},{\"attributes\":{\"callback\":null},\"id\":\"5287175f-c9f8-411d-89ff-7af23328007d\",\"type\":\"DataRange1d\"},{\"attributes\":{\"source\":{\"id\":\"0415ebbd-bfea-45af-b05b-7c9189ab6ba8\",\"type\":\"ColumnDataSource\"}},\"id\":\"12c7e3d3-f4cb-42b3-91e6-6b1b2659d0e0\",\"type\":\"CDSView\"},{\"attributes\":{\"data_source\":{\"id\":\"0415ebbd-bfea-45af-b05b-7c9189ab6ba8\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"997dfd4e-4159-4895-9410-42cb2af7f8cb\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"b52da41b-0a86-4c32-b645-68f1b09266bc\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"12c7e3d3-f4cb-42b3-91e6-6b1b2659d0e0\",\"type\":\"CDSView\"}},\"id\":\"c88b6103-737c-4cca-b02d-cbff8272fc91\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"6bf9df85-46e6-463b-a024-4c9290f6c5c1\",\"type\":\"LinearScale\"},{\"attributes\":{\"callback\":null,\"overlay\":{\"id\":\"5a0d7e3b-76aa-46bc-9c9c-bab77ab0caad\",\"type\":\"PolyAnnotation\"}},\"id\":\"3ceadcdb-9a42-43b6-9841-666173a5de35\",\"type\":\"LassoSelectTool\"},{\"attributes\":{\"plot\":{\"id\":\"be104740-39d7-4a38-a589-669c0a7df8a8\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"7fac5a59-fb65-408c-ba63-302c3d868b51\",\"type\":\"BasicTicker\"}},\"id\":\"49442b86-1bd2-412f-8f6e-0b6ef3304c35\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"63baed75-c630-4d52-bbc0-3d39f217d868\",\"type\":\"PanTool\"},{\"attributes\":{\"callback\":null,\"overlay\":{\"id\":\"67948dc6-01b7-4c5d-b192-a7b60fec5859\",\"type\":\"BoxAnnotation\"},\"renderers\":[{\"id\":\"41e15966-48ec-401c-b999-ac2e44ec1420\",\"type\":\"GlyphRenderer\"}]},\"id\":\"0ecf10bf-167d-442c-9df5-35cc998535f2\",\"type\":\"BoxSelectTool\"},{\"attributes\":{\"formatter\":{\"id\":\"52712294-2e69-4665-9f45-5dd7211aa59e\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"be104740-39d7-4a38-a589-669c0a7df8a8\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"7fac5a59-fb65-408c-ba63-302c3d868b51\",\"type\":\"BasicTicker\"}},\"id\":\"a23d3cde-9903-4616-a4b7-ef335f50c54e\",\"type\":\"LinearAxis\"},{\"attributes\":{\"children\":[{\"id\":\"85b8e72e-9438-402c-bafd-019ed585d41e\",\"type\":\"Row\"}]},\"id\":\"fe47d169-6946-46d8-b929-d2f6ea6638a3\",\"type\":\"Column\"},{\"attributes\":{},\"id\":\"ae217198-5fdc-449f-a66d-e522180b530e\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"callback\":null,\"overlay\":{\"id\":\"c5976348-866e-4bbf-856a-7820bc68837e\",\"type\":\"BoxAnnotation\"},\"renderers\":[{\"id\":\"c88b6103-737c-4cca-b02d-cbff8272fc91\",\"type\":\"GlyphRenderer\"}]},\"id\":\"e26a8db7-cd90-4b5c-9e91-35d9786e01c3\",\"type\":\"BoxSelectTool\"},{\"attributes\":{},\"id\":\"8a3d8c55-da28-4276-a2a6-97a5a2fd9f8c\",\"type\":\"PanTool\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"c5976348-866e-4bbf-856a-7820bc68837e\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"fill_color\":{\"value\":\"blue\"},\"line_color\":{\"value\":\"blue\"},\"x\":{\"field\":\"yr\"},\"y\":{\"field\":\"mpg\"}},\"id\":\"997dfd4e-4159-4895-9410-42cb2af7f8cb\",\"type\":\"Circle\"},{\"attributes\":{\"overlay\":{\"id\":\"dfee3eea-2c74-4faf-a8d0-539a382eca7c\",\"type\":\"BoxAnnotation\"}},\"id\":\"58306f51-8623-4940-82f3-edd6d2af4f20\",\"type\":\"BoxZoomTool\"}],\"root_ids\":[\"3bd921ca-ff61-4d4d-990b-3315bdc50fc5\"]},\"title\":\"Bokeh Application\",\"version\":\"0.12.10\"}};\n",
       "    var render_items = [{\"docid\":\"d03d1cb4-e8b6-4045-b1dc-d30547578bc3\",\"elementid\":\"92350fe7-0257-495b-8821-c3c3fbae175e\",\"modelid\":\"3bd921ca-ff61-4d4d-990b-3315bdc50fc5\"}];\n",
       "\n",
       "    root.Bokeh.embed.embed_items(docs_json, render_items);\n",
       "  }\n",
       "\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    var attempts = 0;\n",
       "    var timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        embed_document(root);\n",
       "        clearInterval(timer);\n",
       "      }\n",
       "      attempts++;\n",
       "      if (attempts > 100) {\n",
       "        console.log(\"Bokeh: ERROR: Unable to embed document because BokehJS library is missing\")\n",
       "        clearInterval(timer);\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "3bd921ca-ff61-4d4d-990b-3315bdc50fc5"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from bokeh.models import ColumnDataSource\n",
    "from bokeh.layouts import gridplot\n",
    "\n",
    "source = ColumnDataSource(autompg)\n",
    "\n",
    "options = dict(plot_width=300, plot_height=300,\n",
    "               tools=\"pan,wheel_zoom,box_zoom,box_select,lasso_select\")\n",
    "\n",
    "p1 = figure(title=\"MPG by Year\", **options)\n",
    "p1.circle(\"yr\", \"mpg\", color=\"blue\", source=source)\n",
    "\n",
    "p2 = figure(title=\"HP vs. Displacement\", **options)\n",
    "p2.circle(\"hp\", \"displ\", color=\"green\", source=source)\n",
    "\n",
    "p3 = figure(title=\"MPG vs. Displacement\", **options)\n",
    "p3.circle(\"mpg\", \"displ\", size=\"cyl\", line_color=\"red\", fill_color=None, source=source)\n",
    "\n",
    "p = gridplot([[ p1, p2, p3]], toolbar_location=\"right\")\n",
    "\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "你可以在 [Providing Data for Plots and Tables](https://bokeh.pydata.org/en/latest/docs/user_guide/data.html) 了解更多关于`ColumnDataSource`和其它Bokeh数据结构。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 独立 HTML\n",
    "\n",
    "除了和 Notebook 协同工作，Bokeh 也可以把图表保存到 HTML 文件里。这个是前面的条形图示例，但是保存到独立的文件中。\n",
    "\n",
    "现在，当我们调用`show()`时，一个新的浏览器页面会打开图表。如果我们只是想保存文件，我们可以使用`save()`。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\ProgramData\\Anaconda3\\lib\\site-packages\\bokeh\\core\\json_encoder.py:80: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n",
      "  elif np.issubdtype(type(obj), np.float):\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<div class=\"bk-root\">\n",
       "    <div class=\"bk-plotdiv\" id=\"22836073-67a7-4dde-8ba7-25a0400866d9\"></div>\n",
       "</div>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    var docs_json = {\"04fb8cc6-f10e-4b25-864d-ee352e9f23ca\":{\"roots\":{\"references\":[{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"0793a7d4-ac30-4f90-81ce-0455a3a8fd23\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"3b1526d5-fce1-4167-a9f4-aba7bb29b47b\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"b54346c5-53f6-4bd7-bc14-aecb18377b74\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"a391d5f9-c1cf-4c99-90c1-60797131c73b\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"d1922d38-0c52-426e-a9e5-e053f17aed25\",\"type\":\"HelpTool\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"x\",\"top\",\"bottom\"],\"data\":{\"bottom\":{\"__ndarray__\":\"gvFgx2qzKECcKci59t4sQJZdRzm5jipAzvVtn6zMKECki7kXNjswQIpnc6D2pi5ApAV4qVNeL0DtFQi6+rIwQBxLQL6+KTFAWBwW2YNMMkBnDzEy+Oo6QAq856zmjDhAfzfsSXnEOkA=\",\"dtype\":\"float64\",\"shape\":[13]},\"top\":{\"__ndarray__\":\"55jlF2UHN0DAzlQxaMk7QBEIyj5aJjhATTh849zMNUD6TNCFok49QMPUTjgNNTlA1KLp0Ht2O0AT6vdFBQ0+QNr+XjaL9T5AVt48aCfjP0AojYptQ1hEQPSsO6IX6UFAQOQJW8OdQkA=\",\"dtype\":\"float64\",\"shape\":[13]},\"x\":[70,71,72,73,74,75,76,77,78,79,80,81,82]}},\"id\":\"28310411-4597-47af-9ebe-fcf9597e3034\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"label\":{\"value\":\"Japanese\"},\"renderers\":[{\"id\":\"b826a256-f9ec-41f0-a1fd-ea9a3c6783d0\",\"type\":\"GlyphRenderer\"}]},\"id\":\"1642ea15-9d76-47fe-a0de-e536c0b2ec26\",\"type\":\"LegendItem\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.3},\"fill_color\":{\"value\":\"red\"},\"line_alpha\":{\"value\":0.3},\"line_color\":{\"value\":\"red\"},\"size\":{\"units\":\"screen\",\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"611668ca-4f55-473b-b99f-3e9fc6bbe88a\",\"type\":\"Circle\"},{\"attributes\":{\"source\":{\"id\":\"096bcd39-ce0f-466d-a5f0-282bcef6bc3a\",\"type\":\"ColumnDataSource\"}},\"id\":\"114b1c65-f902-41fa-9c8e-831ea2f2ae84\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"28310411-4597-47af-9ebe-fcf9597e3034\",\"type\":\"ColumnDataSource\"}},\"id\":\"f742d22d-1c9b-4c75-bf8f-65b8521b77bc\",\"type\":\"CDSView\"},{\"attributes\":{\"data_source\":{\"id\":\"096bcd39-ce0f-466d-a5f0-282bcef6bc3a\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"e6748af6-6653-4d91-8eff-faa435a65be1\",\"type\":\"Triangle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"47596375-da01-41ee-91e8-ad6b6dd39ba6\",\"type\":\"Triangle\"},\"selection_glyph\":null,\"view\":{\"id\":\"114b1c65-f902-41fa-9c8e-831ea2f2ae84\",\"type\":\"CDSView\"}},\"id\":\"33aea1da-1341-498a-b2e5-249e24995942\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"fa5ae8f4-f0c9-466f-94e4-d86466106add\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"x\",\"y\"],\"data\":{\"x\":[70,70,71,71,71,71,72,72,72,72,72,73,73,73,73,74,74,74,74,74,74,75,75,75,75,76,76,76,76,77,77,77,77,77,77,78,78,78,78,78,78,78,78,79,79,80,80,80,80,80,80,80,80,80,80,80,80,80,81,81,81,81,81,81,81,81,81,81,81,81,82,82,82,82,82,82,82,82,82],\"y\":{\"__ndarray__\":\"AAAAAAAAOEAAAAAAAAA7QAAAAAAAADtAAAAAAAAAOUAAAAAAAAA/QAAAAAAAgEFAAAAAAAAAOEAAAAAAAAAzQAAAAAAAADxAAAAAAAAAN0AAAAAAAAA7QAAAAAAAADRAAAAAAAAANkAAAAAAAAAyQAAAAAAAADRAAAAAAAAAP0AAAAAAAABAQAAAAAAAAD9AAAAAAAAAQEAAAAAAAAA4QAAAAAAAADpAAAAAAAAAPUAAAAAAAAA4QAAAAAAAADhAAAAAAACAQEAAAAAAAIBAQAAAAAAAAEBAAAAAAAAAPEAAAAAAAAAzQAAAAAAAgD9AAAAAAADAQEAAAAAAAAA6QAAAAAAAAD5AAAAAAAAANkAAAAAAAIA1QGZmZmZmZkBAMzMzMzOzQ0DNzMzMzAxCQAAAAAAAgDtAMzMzMzMzO0CamZmZmRk1QGZmZmZm5jdAAAAAAACAPUDNzMzMzAxBQM3MzMzMzD9AzczMzMwMQ0CamZmZmZlCQM3MzMzMzD1AzczMzMxMP0AAAAAAAIBCQJqZmZmZGUBAzczMzMxMR0BmZmZmZmZEQM3MzMzMTEZAZmZmZmbmQECamZmZmVlAQDMzMzMzszdAMzMzMzMzQEDNzMzMzIxDQM3MzMzMjEFAZmZmZmYmQEAAAAAAAIBCQJqZmZmZ2UJAzczMzMwMQUCamZmZmdlAQDMzMzMzM0BAMzMzMzNzQECamZmZmZk/QGZmZmZmZjlAMzMzMzMzOEAAAAAAAIBCQAAAAAAAAD9AAAAAAAAAQkAAAAAAAABCQAAAAAAAAEFAAAAAAAAAQ0AAAAAAAABAQAAAAAAAAENAAAAAAAAAQEA=\",\"dtype\":\"float64\",\"shape\":[79]}}},\"id\":\"5154c470-a833-42d8-ba70-ea3aca4e1120\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"label\":{\"value\":\"MPG 1 stddev\"},\"renderers\":[{\"id\":\"ea7bcb48-a766-43d0-bd1f-a488050c34a4\",\"type\":\"GlyphRenderer\"}]},\"id\":\"700a6855-fb90-4e90-971f-e0abe04ea4d3\",\"type\":\"LegendItem\"},{\"attributes\":{},\"id\":\"391bca93-1bec-420c-a929-27daf069449a\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"items\":[{\"id\":\"700a6855-fb90-4e90-971f-e0abe04ea4d3\",\"type\":\"LegendItem\"},{\"id\":\"1642ea15-9d76-47fe-a0de-e536c0b2ec26\",\"type\":\"LegendItem\"},{\"id\":\"02e690c4-315c-4b72-967e-5324c14e1c6f\",\"type\":\"LegendItem\"}],\"location\":\"top_left\",\"plot\":{\"id\":\"6b97fef2-52b8-4bdb-9c22-56b093e67ceb\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"46bc61cd-f814-4e84-bb45-ebe84f0185b9\",\"type\":\"Legend\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"54c0201e-2873-49e0-99a8-9444d4375a69\",\"type\":\"Circle\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"x\",\"y\"],\"data\":{\"x\":[70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,74,74,74,74,74,74,74,74,74,74,74,74,74,74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,80,80,80,80,80,80,81,81,81,81,81,81,81,81,81,81,81,81,81,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82],\"y\":{\"__ndarray__\":\"AAAAAAAAMkAAAAAAAAAuQAAAAAAAADJAAAAAAAAAMEAAAAAAAAAxQAAAAAAAAC5AAAAAAAAALEAAAAAAAAAsQAAAAAAAACxAAAAAAAAALkAAAAAAAAAuQAAAAAAAACxAAAAAAAAALkAAAAAAAAAsQAAAAAAAADZAAAAAAAAAMkAAAAAAAAA1QAAAAAAAADVAAAAAAAAAJEAAAAAAAAAkQAAAAAAAACZAAAAAAAAAIkAAAAAAAAA8QAAAAAAAADNAAAAAAAAAMEAAAAAAAAAxQAAAAAAAADNAAAAAAAAAMkAAAAAAAAAsQAAAAAAAACxAAAAAAAAALEAAAAAAAAAsQAAAAAAAAChAAAAAAAAAKkAAAAAAAAAqQAAAAAAAADJAAAAAAAAANkAAAAAAAAAzQAAAAAAAADJAAAAAAAAAN0AAAAAAAAA6QAAAAAAAADlAAAAAAAAANEAAAAAAAAA1QAAAAAAAACpAAAAAAAAALEAAAAAAAAAuQAAAAAAAACxAAAAAAAAAMUAAAAAAAAAmQAAAAAAAACpAAAAAAAAAKEAAAAAAAAAqQAAAAAAAAC5AAAAAAAAAKkAAAAAAAAAqQAAAAAAAACxAAAAAAAAANkAAAAAAAAA8QAAAAAAAACpAAAAAAAAALEAAAAAAAAAqQAAAAAAAACxAAAAAAAAALkAAAAAAAAAoQAAAAAAAACpAAAAAAAAAKkAAAAAAAAAsQAAAAAAAACpAAAAAAAAAKEAAAAAAAAAqQAAAAAAAADJAAAAAAAAAMEAAAAAAAAAyQAAAAAAAADJAAAAAAAAAN0AAAA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mRkyQDMzMzMzMzNAMzMzMzOzMUCamZmZmRkyQAAAAAAAgDFAAAAAAAAAPkBmZmZmZuY+QDMzMzMzMzdAzczMzMzMN0AAAAAAAIA1QM3MzMzMzDNAzczMzMxMNkAzMzMzMzM0QJqZmZmZmTRAAAAAAAAAMUCamZmZmZkxQAAAAAAAgDBAMzMzMzMzMkBmZmZmZuYwQAAAAAAAAC9AMzMzMzMzM0AAAAAAAIAyQJqZmZmZ2UFAZmZmZmZmO0AAAAAAAAA3QGZmZmZm5jdAmpmZmZkZQUAAAAAAAEBBQGZmZmZmZjxAzczMzMzMPEDNzMzMzMw6QAAAAAAAwEBAzczMzMwMQEAAAAAAAAA8QGZmZmZmZjpAzczMzMxMOECamZmZmRkzQGZmZmZm5jtAMzMzMzMzO0CamZmZmZk6QM3MzMzMzDlAAAAAAACAN0AAAAAAAAA+QAAAAAAAgENAmpmZmZlZQUAzMzMzMzNBQGZmZmZm5j1AZmZmZmZmNkCamZmZmZk6QDMzMzMzMzRAmpmZmZmZMUAAAAAAAAA8QAAAAAAAADtAAAAAAAAAQUAAAAAAAAA/QAAAAAAAAD1AAAAAAAAAO0AAAAAAAAA4QAAAAAAAAENAAAAAAAAAQkAAAAAAAAA5QAAAAAAAAENAAAAAAAAAOkAAAAAAAAA2QAAAAAAAAEJAAAAAAAAAO0AAAAAAAAA7QAAAAAAAAEBAAAAAAAAAPEAAAAAAAAA/QA==\",\"dtype\":\"float64\",\"shape\":[245]}}},\"id\":\"096bcd39-ce0f-466d-a5f0-282bcef6bc3a\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.3},\"fill_color\":{\"value\":\"blue\"},\"line_alpha\":{\"value\":0.3},\"line_color\":{\"value\":\"blue\"},\"size\":{\"units\":\"screen\",\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"e6748af6-6653-4d91-8eff-faa435a65be1\",\"type\":\"Triangle\"},{\"attributes\":{\"data_source\":{\"id\":\"5154c470-a833-42d8-ba70-ea3aca4e1120\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"611668ca-4f55-473b-b99f-3e9fc6bbe88a\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"54c0201e-2873-49e0-99a8-9444d4375a69\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"d44656d4-906a-4615-a316-fbf5b5885b6f\",\"type\":\"CDSView\"}},\"id\":\"b826a256-f9ec-41f0-a1fd-ea9a3c6783d0\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"55389ab0-20c5-4459-a674-730fa6ee0898\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"plot\":null,\"text\":\"MPG by Year (Japan and US)\"},\"id\":\"43849452-e5d6-49c9-a4b8-df28f491bf59\",\"type\":\"Title\"},{\"attributes\":{\"source\":{\"id\":\"5154c470-a833-42d8-ba70-ea3aca4e1120\",\"type\":\"ColumnDataSource\"}},\"id\":\"d44656d4-906a-4615-a316-fbf5b5885b6f\",\"type\":\"CDSView\"},{\"attributes\":{\"callback\":null},\"id\":\"e0184575-1391-4b56-8e5a-4777ac01d2f4\",\"type\":\"DataRange1d\"},{\"attributes\":{\"label\":{\"value\":\"American\"},\"renderers\":[{\"id\":\"33aea1da-1341-498a-b2e5-249e24995942\",\"type\":\"GlyphRenderer\"}]},\"id\":\"02e690c4-315c-4b72-967e-5324c14e1c6f\",\"type\":\"LegendItem\"},{\"attributes\":{},\"id\":\"02d9546b-370d-4418-a991-f3112613a1c4\",\"type\":\"LinearScale\"},{\"attributes\":{\"dimension\":1,\"plot\":{\"id\":\"6b97fef2-52b8-4bdb-9c22-56b093e67ceb\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"461b3adf-0669-4ad1-806f-4f6871d1c7f9\",\"type\":\"BasicTicker\"}},\"id\":\"3763eafe-3588-460f-8d0a-0238d3ed3efa\",\"type\":\"Grid\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"47596375-da01-41ee-91e8-ad6b6dd39ba6\",\"type\":\"Triangle\"},{\"attributes\":{\"overlay\":{\"id\":\"0793a7d4-ac30-4f90-81ce-0455a3a8fd23\",\"type\":\"BoxAnnotation\"}},\"id\":\"c0ce0d19-1edf-4688-904c-3091e11a8f00\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"7f040a8d-a63b-4356-aa1f-4699c873ce95\",\"type\":\"PanTool\"},{\"id\":\"55389ab0-20c5-4459-a674-730fa6ee0898\",\"type\":\"WheelZoomTool\"},{\"id\":\"c0ce0d19-1edf-4688-904c-3091e11a8f00\",\"type\":\"BoxZoomTool\"},{\"id\":\"3b1526d5-fce1-4167-a9f4-aba7bb29b47b\",\"type\":\"SaveTool\"},{\"id\":\"a391d5f9-c1cf-4c99-90c1-60797131c73b\",\"type\":\"ResetTool\"},{\"id\":\"d1922d38-0c52-426e-a9e5-e053f17aed25\",\"type\":\"HelpTool\"}]},\"id\":\"9ab37340-7c03-4421-93f0-06da25ba7dbb\",\"type\":\"Toolbar\"},{\"attributes\":{\"bottom\":{\"field\":\"bottom\"},\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"top\":{\"field\":\"top\"},\"width\":{\"value\":0.8},\"x\":{\"field\":\"x\"}},\"id\":\"1c9b09d1-9b34-465d-bf83-d96df8b809c8\",\"type\":\"VBar\"},{\"attributes\":{\"plot\":{\"id\":\"6b97fef2-52b8-4bdb-9c22-56b093e67ceb\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"b54346c5-53f6-4bd7-bc14-aecb18377b74\",\"type\":\"BasicTicker\"}},\"id\":\"794c5da0-ab09-4b98-a1cf-d19e8add9b5f\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"f9964fae-4a33-4f9e-8637-c783a7e34aed\",\"type\":\"LinearScale\"},{\"attributes\":{\"callback\":null},\"id\":\"e0c6b37b-bee4-4149-80ec-a4e4e8c1f2f5\",\"type\":\"DataRange1d\"},{\"attributes\":{\"formatter\":{\"id\":\"391bca93-1bec-420c-a929-27daf069449a\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"6b97fef2-52b8-4bdb-9c22-56b093e67ceb\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"461b3adf-0669-4ad1-806f-4f6871d1c7f9\",\"type\":\"BasicTicker\"}},\"id\":\"2f521d84-16f6-454a-9d03-22f7a9c74066\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"7f040a8d-a63b-4356-aa1f-4699c873ce95\",\"type\":\"PanTool\"},{\"attributes\":{\"formatter\":{\"id\":\"fa5ae8f4-f0c9-466f-94e4-d86466106add\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"6b97fef2-52b8-4bdb-9c22-56b093e67ceb\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"b54346c5-53f6-4bd7-bc14-aecb18377b74\",\"type\":\"BasicTicker\"}},\"id\":\"52dbc1f7-b16c-4f0c-b7ac-4aea3503bd25\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"461b3adf-0669-4ad1-806f-4f6871d1c7f9\",\"type\":\"BasicTicker\"},{\"attributes\":{\"data_source\":{\"id\":\"28310411-4597-47af-9ebe-fcf9597e3034\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"cd099004-27fa-49e7-99eb-158f1217ba78\",\"type\":\"VBar\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1c9b09d1-9b34-465d-bf83-d96df8b809c8\",\"type\":\"VBar\"},\"selection_glyph\":null,\"view\":{\"id\":\"f742d22d-1c9b-4c75-bf8f-65b8521b77bc\",\"type\":\"CDSView\"}},\"id\":\"ea7bcb48-a766-43d0-bd1f-a488050c34a4\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"bottom\":{\"field\":\"bottom\"},\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_color\":{\"value\":null},\"top\":{\"field\":\"top\"},\"width\":{\"value\":0.8},\"x\":{\"field\":\"x\"}},\"id\":\"cd099004-27fa-49e7-99eb-158f1217ba78\",\"type\":\"VBar\"},{\"attributes\":{\"below\":[{\"id\":\"52dbc1f7-b16c-4f0c-b7ac-4aea3503bd25\",\"type\":\"LinearAxis\"}],\"left\":[{\"id\":\"2f521d84-16f6-454a-9d03-22f7a9c74066\",\"type\":\"LinearAxis\"}],\"renderers\":[{\"id\":\"52dbc1f7-b16c-4f0c-b7ac-4aea3503bd25\",\"type\":\"LinearAxis\"},{\"id\":\"794c5da0-ab09-4b98-a1cf-d19e8add9b5f\",\"type\":\"Grid\"},{\"id\":\"2f521d84-16f6-454a-9d03-22f7a9c74066\",\"type\":\"LinearAxis\"},{\"id\":\"3763eafe-3588-460f-8d0a-0238d3ed3efa\",\"type\":\"Grid\"},{\"id\":\"0793a7d4-ac30-4f90-81ce-0455a3a8fd23\",\"type\":\"BoxAnnotation\"},{\"id\":\"46bc61cd-f814-4e84-bb45-ebe84f0185b9\",\"type\":\"Legend\"},{\"id\":\"ea7bcb48-a766-43d0-bd1f-a488050c34a4\",\"type\":\"GlyphRenderer\"},{\"id\":\"b826a256-f9ec-41f0-a1fd-ea9a3c6783d0\",\"type\":\"GlyphRenderer\"},{\"id\":\"33aea1da-1341-498a-b2e5-249e24995942\",\"type\":\"GlyphRenderer\"}],\"title\":{\"id\":\"43849452-e5d6-49c9-a4b8-df28f491bf59\",\"type\":\"Title\"},\"toolbar\":{\"id\":\"9ab37340-7c03-4421-93f0-06da25ba7dbb\",\"type\":\"Toolbar\"},\"x_range\":{\"id\":\"e0184575-1391-4b56-8e5a-4777ac01d2f4\",\"type\":\"DataRange1d\"},\"x_scale\":{\"id\":\"02d9546b-370d-4418-a991-f3112613a1c4\",\"type\":\"LinearScale\"},\"y_range\":{\"id\":\"e0c6b37b-bee4-4149-80ec-a4e4e8c1f2f5\",\"type\":\"DataRange1d\"},\"y_scale\":{\"id\":\"f9964fae-4a33-4f9e-8637-c783a7e34aed\",\"type\":\"LinearScale\"}},\"id\":\"6b97fef2-52b8-4bdb-9c22-56b093e67ceb\",\"subtype\":\"Figure\",\"type\":\"Plot\"}],\"root_ids\":[\"6b97fef2-52b8-4bdb-9c22-56b093e67ceb\"]},\"title\":\"Bokeh Application\",\"version\":\"0.12.10\"}};\n",
       "    var render_items = [{\"docid\":\"04fb8cc6-f10e-4b25-864d-ee352e9f23ca\",\"elementid\":\"22836073-67a7-4dde-8ba7-25a0400866d9\",\"modelid\":\"6b97fef2-52b8-4bdb-9c22-56b093e67ceb\"}];\n",
       "\n",
       "    root.Bokeh.embed.embed_items(docs_json, render_items);\n",
       "  }\n",
       "\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    var attempts = 0;\n",
       "    var timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        embed_document(root);\n",
       "        clearInterval(timer);\n",
       "      }\n",
       "      attempts++;\n",
       "      if (attempts > 100) {\n",
       "        console.log(\"Bokeh: ERROR: Unable to embed document because BokehJS library is missing\")\n",
       "        clearInterval(timer);\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "6b97fef2-52b8-4bdb-9c22-56b093e67ceb"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from bokeh.plotting import output_file\n",
    "\n",
    "output_file(\"barplot.html\")\n",
    "\n",
    "p = figure(title=\"MPG by Year (Japan and US)\")\n",
    "\n",
    "p.vbar(x=years, bottom=avg-std, top=avg+std, width=0.8, \n",
    "       fill_alpha=0.2, line_color=None, legend=\"MPG 1 stddev\")\n",
    "\n",
    "p.circle(x=japanese[\"yr\"], y=japanese[\"mpg\"], size=10, alpha=0.3,\n",
    "         color=\"red\", legend=\"Japanese\")\n",
    "\n",
    "p.triangle(x=american[\"yr\"], y=american[\"mpg\"], size=10, alpha=0.3,\n",
    "           color=\"blue\", legend=\"American\")\n",
    "\n",
    "p.legend.location = \"top_left\"\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Bokeh 应用\n",
    "\n",
    "Bokeh 还有一个 server 模块，用来创建交互式Web应用，可以轻松地把强大的pydata系列工具和精致的Bokeh可视效果连接起来。Bokeh server 可用于：\n",
    "\n",
    "* 响应浏览器中生成的UI和工具事件，借助Python的全部功能进行计算或查询\n",
    "* 自动将服务器端更新推送给UI（即浏览器中的小部件或图表）\n",
    "* 使用周期，超时，和异步回调函数来流动更新\n",
    "\n",
    "点击下面的缩略图来启动Bokeh应用。\n",
    "\n",
    "<center>\n",
    "<a href=\"https://demo.bokehplots.com/apps/crossfilter\">\n",
    "  <img \n",
    "    width=\"30%\" height=\"30%\" style=\"display: inline ; padding: 10px;\" \n",
    "    src=\"https://bokeh.pydata.org/static/crossfilter_t.png\"\n",
    "  >\n",
    "</a>\n",
    "\n",
    "<a href=\"https://demo.bokehplots.com/apps/movies\">\n",
    "  <img \n",
    "    width=\"30%\" height=\"30%\" style=\"display: inline ; padding: 10px;\" \n",
    "    src=\"https://bokeh.pydata.org/static/movies_t.png\" \n",
    "  >\n",
    "</a>\n",
    "\n",
    "<a href=\"https://demo.bokehplots.com/apps/gapminder\">\n",
    "  <img \n",
    "    width=\"30%\" height=\"30%\" style=\"display: inline ; padding: 10px;\" \n",
    "    src=\"http://bokeh.pydata.org/static/gapminder_t.png\"\n",
    "  >\n",
    "</a>\n",
    "</center>\n",
    "\n",
    "关于开发和部署Bokeh server应用的更多的细节和信息，请参考用户指南章节 [Running a Bokeh Server](https://bokeh.pydata.org/en/latest/docs/user_guide/server.html)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## BokehJS\n",
    "\n",
    "Bokeh 的核心，由一个JavaScript库 [BokehJS](https://github.com/bokeh/bokeh/tree/master/bokehjs)，和一个 Python binding 组成。该 Python binding 提供类和对象以最终生成图表结构的JSON表示。\n",
    "\n",
    "您可以在用户参考指南的 [Developing with JavaScript](https://bokeh.pydata.org/en/latest/docs/user_guide/bokehjs.html) 章节找到更多的设计和使用资料。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 更多信息\n",
    "\n",
    "在下面列出的资源中，可找到更多的细节和信息：\n",
    "\n",
    "*Documentation:* https://bokeh.pydata.org/en/latest\n",
    "\n",
    "*GitHub:* https://github.com/bokeh/bokeh\n",
    "\n",
    "*Mailing list:* [bokeh@anaconda.com](mailto:bokeh@anaconda.com)\n",
    "\n",
    "*Gitter Chat:* https://gitter.im/bokeh/bokeh\n",
    "\n",
    "Be sure to follow us on Twitter [@bokehplots](http://twitter.com/BokehPlots>) and on [Youtube](https://www.youtube.com/c/Bokehplots)!\n",
    "\n",
    "<img src=\"../images/bokeh-transparent.png\" width=\"64px\" height=\"64px\">"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
